Add script/server and other needed changes

This commit is contained in:
Mark Tareshawty 2018-03-11 16:02:24 -04:00
Родитель 0cca002d3a
Коммит d592598ad9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 28DD1C473BF9D1AE
4 изменённых файлов: 34 добавлений и 3 удалений

1
Procfile.dev Normal file
Просмотреть файл

@ -0,0 +1 @@
web: ./bin/rails server -p 5000

Просмотреть файл

@ -53,9 +53,9 @@ Alternatively, you can get the book content from a repository on your computer b
Now you can run the Rails site to take a look.
$ rails server
$ ./script/server
The site should be running on http://localhost:3000
The site should be running on http://localhost:5000
## Testing
@ -66,7 +66,7 @@ To run the tests for this project, run:
To run the website for testing purposes, run:
$ rails server
$ ./script/server
## Contributing

17
script/server Executable file
Просмотреть файл

@ -0,0 +1,17 @@
#!/bin/sh
# script/server: Launch the application and any extra required processes
# locally.
set -e
cd "$(dirname "$0")/.."
# ensure everything in the app is up to date.
script/update
test -z "$RACK_ENV" &&
RACK_ENV='development'
# boot the app and any other necessary processes.
foreman start -f Procfile.dev

13
script/update Executable file
Просмотреть файл

@ -0,0 +1,13 @@
#!/bin/sh
# script/update: Update application to run for its current checkout.
set -e
cd "$(dirname "$0")/.."
script/bootstrap
echo "==> Updating db..."
# run all database migrations to ensure everything is up to date.
bin/rake db:migrate