Translation service between a spoken and a signed language.
Optionally, this application, the database and all the different tests can be build and run in Docker.
To build and run only the database components in Docker, execute:
docker-compose up -d mongo mongo-seed mongo-express
Install project dependencies:
npm install
Create an .env
file and set the IBM Cloud Natural Language Understanding service URL and API key by replacing <NLU_URL>
and <NLU_API_KEY>
:
NLU_URL=<NLU_URL>
NLU_API_KEY=<NLU_API_KEY>
Create an .env
file to start the application in cluster mode, change its running port, log level, directory and maximum size. The variable names and default values are:
CLUSTER_MODE=false
PORT=3000
LOG_ENABLED=true
LOG_LEVEL=info
LOG_DIR=logs
LOG_MAX_SIZE=10m
LOG_MAX_FILES=7d
Change MongoDB connection by specifying MONGODB_HOSTNAME
and MONGODB_PORT
values in .env
file. The default values are:
MONGODB_HOSTNAME=localhost
MONGODB_PORT=27017
Start the application:
npm start
Access localhost:3000/docs to check the API documentation.
Run code style, unit, integration and security tests:
npm test
Generate code coverage test report:
npm run cover
When reports are created, coverage/lcov-report/index.html
can be opened in a web browser.
Run performance tests:
npm run test:performance
When performance tests are completed, generate report:
npm run performance:report
logs/performance.log.html
should open in a web browser.