diff --git a/README.md b/README.md index b15ebd9..f0e8305 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bin/setup b/bin/setup new file mode 100755 index 0000000..7ae08e9 --- /dev/null +++ b/bin/setup @@ -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 ..