This is a rad base for starting a new full-stack project + Auth, or just as reference for how to do things the Harrison way (which is with absolutely no test folder, I'll leave that one to Alan)
- Fork this repo to your github
- Rename your repo according to the app you're building
To start a new project:
- Make a new repo on github
git clone https://github.com/harrison-symes/auth-plates.git <NEW REPO NAME HERE>
git remote remove origin
git remote add origin <NEW REPO URL HERE
git remote -v
to see your remotesgit push origin master
to push the boilerplate code to your new repo
Run the following commands in your terminal:
yarn install
yarn knex migrate:latest
yarn knex seed:run
mv .env_example .env
To run in development:
yarn dev
- or -
npm run dev
To run in production:
yarn start
- or -
npm start
Create your app with heroku create [name]
You can check that this was successful by running heroku apps
to view a list of your apps
Add postgresql (hobby dev) to your app at https://dashboard.heroku.com/apps/[APP NAME HERE]/resources
Check that pg has been added by running heroku addons
to ensure the postgresql db is on your app
I have created several npm scripts that will be useful for deploying your app to heroku easily.
To push your local master branch to your heroku app:
yarn h:deploy
- or -
npm run h:deploy
Run heroku migrations:
yarn h:migrate
- or -
npm run h:migrate
Run heroku seeds:
yarn h:seed
- or -
npm run h:seed
If ever you need to rollback, you can also:
yarn h:rollback
- or -
npm run h:rollback
Your app should be deployed!