MERN stack application - final project for The Jetlags.
So you build a slick AF app and you want to use it? There's only one step left. BLAST OFF!
- In your terminal, navigate to the root directory of the Garçon app (for me, that's
/Desktop/garcon
) and runnpm i
to install all the necessary packages. - Navigate to
/client
and runnpm i
again.
Our database isn't deployed yet, so you need to have the DB set up on your workbench.
- The Express server is configured to run with my workbench settings, which basically means your password to connect to Workbench is "password".
- I can't quite remember how complicated it is to change your workbench password, so if it's easier, you can navigate to the
server.js
file in the root directory and edit the password value on line 21.
- I can't quite remember how complicated it is to change your workbench password, so if it's easier, you can navigate to the
- To initialize the database, we need to do the following:
- Navigate to
/client/src/data
and you'll find aschema.sql
file. Run the schema in Workbench (i.e. copy what's in theschema.sql
file into a blank query page in Workbench and run the code) to set up the database. - In your terminal, navigate to the root directory of the Garçon app (for me that's
/Desktop/garcon/
). From here, run:nodemon server.js
. This will start the Express server. When that happens, Sequelize will build the tables we need for our database. - If you refresh the window in Workbench, you should see a
garcon_sequelize_db
which contains the following tables:
- customers
- inventory
- orders
- reservations
- Navigate to
/client/src/data
and you'll find aseeds.sql
file. Sow the seeds in Workbench (i.e. copy what's in theseeds.sql
file into a blank query page in Workbench and run the code) to populate the tables with our dummy data for testing purposes.
- Navigate to
- Navigate to the client directory in your terminal (for me that's
/Desktop/garcon/client
) - Run
npm start
(this starts the React portion of the app. It might take a while to set up but then it should automatically open the app in your browser).