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
mongod
executable file to your system's PATH parameters (C:\Program Files\MongoDB\Server\4.4\bin
on Windows if you did not change the install directory).
- If you already have
nvm
(Node Version Manager) installed, skip this step. Otherwise installnvm
: - Run
nvm install 12.22.3
. - (Repeat) Run
nvm use 12.22.3
. - If you already have
yarn
installed, skip this step. Otherwise, runnpm i -g yarn
. - Clone the repo and navigate to its root.
- Create a
.env
file in/frontend
folder. Take a look at/frontend/.env.example
file for an example. - Create a
.env
file in/backend
folder. Take a look at/backend/.env.example
file for an example.DB_PATH
field: create a folder somewhere on your computer that will hold the MongoDB database files. Then edit theDB_PATH
field of your/backend/.env
file to point to that folder.
- (Repeat) Run
yarn
.
- Run
yarn db:start
. - Run
yarn start
on a seperate terminal.
- You can simply terminate the
yarn start
process (pressCTRL+C
two times on Windows). - Run
yarn db:stop
on 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.