This repository contains a minimum viable project.
- On VSCode, open a new terminal. You may rename the terminal
server
for convenience. Runnpm install
in the project directory. This will install server-related dependencies such asexpress
. - On VSCode, open another new terminal. You may rename the terminal
client
for convenience. First, runcd client
. Once you are in the client directory, runnpm install
. This will install client dependencies (React).
- Open MySQL Command Line Interface programme. Run
mysql -u root -p
- Create a new database called krismvp:
create database krismvp;
- Back to your project folder in VSCode, add a
.env
file to the project folder of this repository containing the MySQL authentication information for MySQL user. For example:
DB_HOST=localhost
DB_USER=root
DB_NAME=krismvp
DB_PASS=YOURPASSWORD
-
Be sure to include .env in your .gitignore file
-
On VSCode, in a new terminal window, run
npm run migrate
in the project folder of this repository. This will create two tables in your database, table 'projects' (with one test row) and table 'categories'. -
In your MySQL console, you can run
use krismvp;
and thendescribe projects;
to see the structure of the projects table.
- On one terminal, run
npm start
in project directory to start the Express server on port 5000 - In another terminal, do
cd client
and runnpm start
to start the client in development mode with hot reloading in port 3000.
This is a student project that was created at CodeOp, a full stack development bootcamp in Barcelona.