This is only for devs.
- Install
mysqlfor your OS. Make sure you addmysqlto the path variables for the next steps. Create a new user for this project if you wish to do so. - Install
nodefor your OS. Make surenpmcomes with your installation, else install that as well. - Clone all the 3 repos in the org:
backend,user-frontendandadmin-frontend(ideally, in a common folder somewhere on your PC for organization and debug support). - Each repo has
.env.examplein the root. Copy the file as.envfor setting up dev credentials. The linux command would becp .env.example .envexecuted in root of each repo. - The backend repo has another config file
/config/config.json.exampleCopy 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.jsonexecuted in the root ofbackend.
-
In your terminal, login to your sql shell with
mysql -u root -pormysql -u username -pif 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