This web application is developed using React JS for frontend and Express on the backend. It is using Sequelize ORM and a MySQL database.
- Download the repo
- On your terminal, run
npm install
- create a local MySQL database
- create a
.env
file in the root folder and put in the following information for your local MySQL database:MYSQL_USER=
MYSQL_KEY=
MYSQL_DBNAME=
MYSQL_HOST=127.0.0.1
- On your terminal, run
export bartender_jwtPrivateKey=
to set a secret key for the JSON web token - Run
node index.js
to launch the Node backend - If everything is configured correctly, the tables should be created for the local MySQL database and you can populate it with appropriate data
- On your terminal, run
cd client
andnpm install
- Put your localhost url in
.env.development
file - On your terminal, run
npm start
- If everthing is configured correctly, the site will launch on your default browser
- On your terminal, log in to Heroku using
heroku login
- Create a project using
heroku create
- Go to your Heroku dashboard -> Add-On -> Search for
JawsDB
(for MySQL) - On your application folder, go to
client
and put yourheroku app URL
in.env.production
- On your terminal, set the environment variables for Heroku:
a.
heroku config:set bartender_jwtPrivateKey=
b.heroku config:set NODE_ENV=production
- push your project to heroku using
git push heroku master
- If everything works well, your project is now on heroku, go to the
heroku app URL
to see it.