Assignment Database System - Transport Passenger
very simple
very simple
Go to admin-portal
, run yarn build
or npm run build
Copy /build
from admin-portal
to root project
Copy all files in root included hidden files (such as .gitignore
, .env
) and excluded admin-portal
, node_modules
, .git
to new repo
In new repo, edit file .gitignore
with comment /build
and .env
That’s all!
git
for local and remote to herokuAdd git for local by git init
Login heroku: heroku login
Remote to heroku: git remote add heroku [link.git]
Commit and deploy:
git add -A
git commit -m "init project"
git push heroku master
On heroku dashboard, go tab Resource
, at Add-ons
, search postgre
and select the option, it will create new postgresql on heroku and connect app to it.
Go to https://data.heroku.com to view your postgreSQL
In data.heroku, choose tab Settings
, click View Credentials
to view database info.
In .env
at local, correct it with info here.
After that, you can deploy again app to heroku without available data on your database.
Go to https://devcenter.heroku.com/articles/heroku-postgresql#pg-push-and-pg-pull to view document if you need.
heroku pg:pull DATABASE_URL mylocaldb --app transport-passener
transport-passenger
is your app name
Here on local will have remote to your postgreSQL on heroku
Open pgadmin3
to edit your database.
Run script or do anything in your database at local Heroku
heroku pg:push mylocaldb DATABASE_URL --app transport-passenger
transport-passenger
is your app name
Go to your app to view your achievement
View APIs here
View Documents here
View instructions here