Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

733 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node API

Description

Node API is the backend service for node-web. It is also a template for Node API applications developed at KTH.

Installation

Install Dependencies

$ npm install

Environment Variables

Sensible defaults are set and the application can run locally with an empty .env file.

Name Description Default Value
API_KEYS Configuration for access to API; string with name, key, and scope ?name=devClient&apiKey=1234&scope=write&scope=read
LOGGING_ACCESS_LOG Enables or disabled application access log, used by dependency kth-node-access-log true
LOGGING_LEVEL Application logging level, used by dependency @kth/log debug
MONGODB_URI Document database connection string mongodb://127.0.0.1:27017/node
SERVER_PORT The HTTP server port 3001
SERVICE_PUBLISH Root path for the application /api/node

Local Databases

Usage

Start the application in local development mode:

$ npm run start-dev

Access the Swagger UI on localhost:3001/api/node/swagger. Authorize with API key set with environment variable API_KEYS. Default value is 1234.

Running Tests

Tests are setup with Jest. Run them with:

$ npm test

Contact

Node API is developed and maintained by Team KTH Web.

About

Node API is the backend service for node-web. It is also a template for Node API applications developed at KTH.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages