1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Add setup script and modify README

This commit is contained in:
Daniel Barber 2018-01-12 16:56:07 -05:00
parent 43a4299478
commit 98baf920a9
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
2 changed files with 23 additions and 14 deletions

View File

@ -1,20 +1,8 @@
# Chess
To start your Phoenix app:
## Getting started
* Install dependencies with `mix deps.get`
* Create and migrate your database with `mix ecto.create && mix ecto.migrate`
* Install Node.js dependencies with `npm install`
* Run the setup script at `bin/setup`
* Start Phoenix endpoint with `mix phoenix.server`
Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.
Ready to run in production? Please [check our deployment guides](http://www.phoenixframework.org/docs/deployment).
## Learn more
* Official website: http://www.phoenixframework.org/
* Guides: http://phoenixframework.org/docs/overview
* Docs: https://hexdocs.pm/phoenix
* Mailing list: http://groups.google.com/group/phoenix-talk
* Source: https://github.com/phoenixframework/phoenix

21
bin/setup Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env sh
echo "Removing previous build artifacts"
rm -rf deps _build
echo "Installing dependencies and compiling"
mix local.hex --force
mix deps.get
mix deps.compile
mix compile
# Set up database
echo "Setting up the database"
mix ecto.create
mix ecto.migrate
# Grab JS dependencies from NPM
echo "Installing npm dependencies"
cd assets
npm install
cd ..