This application is generated using LoopBack 4 CLI with the initial project layout.
Install NVM (Node Version Manager)
- Linux https://github.com/nvm-sh/nvm#installing-and-updating
- Windows https://github.com/coreybutler/nvm-windows#installation--upgrades
Install the latest (Long Term Support) version of Node.js
- Linux
nvm install --lts
- Windows
nvm install lts
Install yarn (package manager): https://yarnpkg.com/getting-started/install
Clone the repository (and the submodules):
git clone --recurse-submodules https://github.com/leanil/ai-arena-backend.git
Install the dependencies: run yarn
in the repo directory (ai-arena-backend
)
Install and run MongoDB: https://www.mongodb.com/docs/manual/installation/#mongodb-installation-tutorials
Install and run Redis: https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/
Build and run the application:
yarn build
node -r source-map-support/register dist/src/index.js --redis-url redis://localhost:6379 --mongodb-url mongodb://localhost:27017/ai-arena
Open http://localhost:3000/graphql in your browser to verify.
Run at least one worker:
node -r source-map-support/register dist/worker/src/worker.js --redis-url redis://localhost:6379 --mongodb-url mongodb://localhost:27017/ai-arena
To incrementally build the project:
yarn run build
To force a full build by cleaning up cached artifacts:
yarn run rebuild
yarn run lint
To automatically fix such issues:
yarn run lint:fix
yarn run migrate
: Migrate database schemas for modelsyarn run openapi-spec
: Generate OpenAPI spec into a fileyarn run docker:build
: Build a Docker image for this applicationyarn run docker:run
: Run this application inside a Docker container
yarn test
Please check out LoopBack 4 documentation to understand how you can continue to add features to this application.