Giter Club home page Giter Club logo

hex_web's Introduction

HexWeb

Build Status

Contributing

To contribute to HexWeb you need to properly set up your development environment.

Also see the client repository: hex. The client uses hex_web for integration tests, so hex_web needs to support all versions the client supports. Travis tests ensures that tests are run on all supported versions.

PostgreSQL Modules And Version

PostgreSQL version should be >= 9.4, as HexWeb uses the jsonb type, that is available from PostgreSQL 9.4 onward.

HexWeb requires the PostgreSQL modules pg_trgm and pgcrypto to be available.

This is located in the "postgresql-contrib" package, however the package name can vary depending on your operating system. If the module is not installed the ecto migrations will fail.

Database

By default, HexWeb connects to a localhost PostgreSQL database hexweb_dev using the username postgres with the password postgres.

Create the database and user 'postgres' if not already done:

CREATE USER postgres;
ALTER USER postgres PASSWORD 'postgres';
CREATE DATABASE hexweb_dev;
GRANT ALL PRIVILEGES ON DATABASE hexweb_dev TO postgres;
ALTER USER postgres WITH SUPERUSER;

If you want to use another database, user or password, you can specify the DEV_DATABASE_URL in the shell before doing development:

export DEV_DATABASE_URL=ecto://USER:PASSWORD@localhost/DATABASE

Now you are fine to run the ecto migrations:

mix ecto.migrate HexWeb.Repo

Sample Data

Using the following command you can seed your local HexWeb instance with some sample data:

mix run priv/repo/seeds.exs

Also, all of the steps above (creating, migrating, and seeding the database) can be achieved by running:

mix ecto.setup

Node Dependencies

All the Node dependencies can be installed with npm:

npm install

These are needed for asset compilation.

Running HexWeb

Once the database is set up you can start HexWeb:

# with console
iex -S mix phoenix.server

# without console
mix phoenix.server

HexWeb will be available at http://localhost:4000/.

Running Tests

By default, tests use a PostgreSQL called hexweb_test see above for setup.

Again, if you want to use another database, user or password, you can specify the TEST_DATABASE_URL in the shell before running tests:

export TEST_DATABASE_URL='ecto://USER:PASSWORD@localhost/DATABASE'

License

Copyright 2015 Eric Meadows-Jönsson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

hex_web's People

Contributors

alco avatar barisbalic avatar benwilson512 avatar bjfish avatar ciaran avatar eksperimental avatar enilsen16 avatar ericmj avatar fteem avatar h4cc avatar henrik avatar jaimeiniesta avatar jbranchaud avatar josevalim avatar lexmag avatar milmazz avatar mkaszubowski avatar mneudert avatar msoedov avatar parkerl avatar pragmaticivan avatar riacataquian avatar scrogson avatar taktes avatar techgaun avatar thousandsofthem avatar tsloughter avatar tuxified avatar whatyouhide avatar wojtekmach avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.