Monorepo for Blockchain Technology Education Software project.
ℹ Perform all of the steps if this is the first-time install. After the first install, you only need to perform the steps marked with (Repeat).
- If you already have MongoDB 4.4.5 installed, skip this step. Otherwise;
- Install MongoDB 4.4.5: https://www.mongodb.com/try/download/community
- Add the directory that contains the
mongodexecutable file to your system's PATH parameters (C:\Program Files\MongoDB\Server\4.4\binon Windows if you did not change the install directory).
- If you already have
nvm(Node Version Manager) installed, skip this step. Otherwise installnvm:- On Windows: https://github.com/coreybutler/nvm-windows
- On Linux: https://github.com/nvm-sh/nvm
- Run
nvm install 12.22.3. - (Repeat) Run
nvm use 12.22.3. - If you already have
yarninstalled, skip this step. Otherwise, runnpm i -g yarn. - Clone the repo and navigate to its root.
- Create a
.envfile in/frontendfolder. Take a look at/frontend/.env.examplefile for an example. - Create a
.envfile in/backendfolder. Take a look at/backend/.env.examplefile for an example.DB_PATHfield: create a folder somewhere on your computer that will hold the MongoDB database files. Then edit theDB_PATHfield of your/backend/.envfile to point to that folder.
- (Repeat) Run
yarn.
- Run
yarn db:start. - Run
yarn starton a seperate terminal.
- You can simply terminate the
yarn startprocess (pressCTRL+Ctwo times on Windows). - Run
yarn db:stopon a seperate terminal to safely terminateyarn db:start.
⚠ Any command that is not listed in this section is not intended for manual use.
| Safe? | Command | Description |
|---|---|---|
| ✅ | start |
Launches the development servers. |
| ✅ | build |
Builds the project in production config. |
| ✅ | db:start |
Starts the MongoDB server. |
| ⚠ | db:stop |
Stops the MongoDB server. |
| ✅ | lint:check |
Lints the project and outputs the result, but doesn't fix anything. |
| ⚠ | lint:fix |
Lints the project and tries to automatically the fix errors. |
| ⚠ | kill |
Kills processes that currently occupy the ports defined in .env files of the packages. |
| ✅ | test |
Runs unit tests. |
| ✅ | test:coverage |
Runs unit tests and collects coverage. |
| ⛔ | sync-lock |
Syncs versions from yarn.lock to package.json files. |
| ⛔ | upgrade-minor |
Upgrades all dependencies with caret range. Overwrites both package.json and yarn.lock. |
| Name | Path | Description |
|---|---|---|
frontend |
/frontend |
Frontend of the BTES project. |
backend |
/backend |
Backend of the BTES project. |
common |
/common |
Shared code between other packages of the BTES project. |
Copyright (c) 2020. All rights reserved. Refer to the LICENSE file.