To use this as boilerplate, you'll need to take the following steps:
Don't fork or clone this repo! Instead, create a new, empty
directory on your machine and git init
(or create an empty repo on
Github and clone it to your local machine)
Now you will have to add the fs-app-template as a remote and merge it into your own repository.
git remote add boilermaker git@github.com:FullstackAcademy/fs-app-template.git
git fetch boilermaker
git merge boilermaker/main
git branch -m master main
Now that you've got the code, follow these steps to get acclimated:
package.json
npm install
MY_APP_NAME
should match the name
parameter in package.json
):createdb <YOUR APP NAME HERE FROM package.json>
createdb <YOUR APP NAME HERE FROM package.json>-test
npm test
will use your test database, while
regular development uses development databaseSync and seed your database by running npm run seed
. Running npm run start:dev
will make great things happen!
heroku login
If you are creating a new app...
heroku create
or heroku create your-app-name
if you have a
name in mind.heroku config:set JWT=<your secret here!>
to set a secret for JWT signingDatabase Setup
heroku addons:create heroku-postgresql:hobby-dev
to add
("provision") a postgres database to your heroku dyno (This creates your production database)
heroku config:set SEED=true
to get heroku to sync and seed your database
note everytime your app restarts, the database tables will be dropped and re-created. To avoid this you can config:unset SEED
If you already have a Heroku app...
heroku git:remote your-app-name
You'll need to be a
collaborator on the app.Now, you should be deployed!