Skip to content

a-gondolkodas-orome/ai-arena-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Arena - backend Node.js CI

This application is generated using LoopBack 4 CLI with the initial project layout.

Setup

Install NVM (Node Version Manager)

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)

Run - native

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

Rebuild the project

To incrementally build the project:

yarn run build

To force a full build by cleaning up cached artifacts:

yarn run rebuild

Fix code style and formatting issues

yarn run lint

To automatically fix such issues:

yarn run lint:fix

Other useful commands

  • yarn run migrate: Migrate database schemas for models
  • yarn run openapi-spec: Generate OpenAPI spec into a file
  • yarn run docker:build: Build a Docker image for this application
  • yarn run docker:run: Run this application inside a Docker container

Tests

yarn test

What's next

Please check out LoopBack 4 documentation to understand how you can continue to add features to this application.

LoopBack

About

Test your strategy and programming skills in the AI Arena.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages