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 origingit remote add origin <NEW REPO URL HEREgit remote -vto see your remotesgit push origin masterto 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 .envTo run in development:
yarn dev
- or -
npm run dev
To run in production:
yarn start
- or -
npm startCreate 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:deployRun heroku migrations:
yarn h:migrate
- or -
npm run h:migrateRun heroku seeds:
yarn h:seed
- or -
npm run h:seedIf ever you need to rollback, you can also:
yarn h:rollback
- or -
npm run h:rollbackYour app should be deployed!