This is only for devs.
- Install
mysql
for your OS. Make sure you addmysql
to the path variables for the next steps. Create a new user for this project if you wish to do so. - Install
node
for your OS. Make surenpm
comes with your installation, else install that as well. - Clone all the 3 repos in the org:
backend
,user-frontend
andadmin-frontend
(ideally, in a common folder somewhere on your PC for organization and debug support). - Each repo has
.env.example
in the root. Copy the file as.env
for setting up dev credentials. The linux command would becp .env.example .env
executed in root of each repo. - The backend repo has another config file
/config/config.json.example
Copy this file as/config/config.json
. Update the new file with your mysql creds: lines 4, 5, 8 The linux command would becp config/config.json.example config/config.json
executed in the root ofbackend
.
-
In your terminal, login to your sql shell with
mysql -u root -p
ormysql -u username -p
if you created a new user for the project. -
Execute the following sql commands to create the database for this project. Note: These are multi-line queries.
CREATE DATABASE cac DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8mb4_unicode_ci; USE cac; -- Set the timezone to UTC SET time_zone = '+00:00'; -- Set InnoDB as the default storage engine SET default_storage_engine=INNODB;
-
In the rot of
backend
, execute the commandnpx sequelize db:migrate
In each repo root, run npm run dev
to bring up the dev server. By default the following PORTS are used.
- Backend: 5000
- Admin Frontend: 4000
- User Frontend: 3000