$ heroku login
$ heroku create
-
Open a
psql
prompt#
-
Create a new database
# CREATE DATABASE your_db_name;
-
Create a new user
# CREATE USER your_user_name WITH PASSWORD 'your_user_password';
-
Change the owner of the new database to the new user
# ALTER DATABASE your_db_name OWNER TO your_user_name;
-
Open a terminal prompt
$
-
Set the
DATABASE_URL
environment variable to store the database connection information (note: this includes credentials).$ export DATABASE_URL="host=localhost dbname=your_db_name user=your_user_name password=your_user_password"
-
Provision the Heroku Postgres add-on, this will set the
DATABASE_URL
environment variable.$ heroku addons:create heroku-postgresql:hobby-dev
$ pipenv install
install dependency graph$ pipenv shell
activate project's virtualenv$ make local
run web app locally
$ make deploy
git push branchmaster
to remoteheroku
$ make start
start service$ make stop
stop service$ heroku logs --tail
view logs
- Initialize the service
/init
. One admin user is created with user idadmin
and passwordpassword
. - Change the default admin password
/user/password/change
- Refresh admin auth token
/user/auth_token/refresh
- Add a user
/user/add
- Add a number
/number/add
- Add the user to the number
/number/user/add
- Get next number
/number/next
See Postman collection for more detail and complete list of endpoints.
Set the TEST_DATABASE_URL
environment variable to store the database connection information (note: this includes credentials).
$ make test
run tests$ make testcov
run tests and generate coverage report
Apache License 2.0