Starter project for Api with the framework Express.
To install the dependencies, run the following command:
# Install dependencies
$> npm install
You have the possibility to set environment variables to configure the port on which will be exposed the API. You can do this by adding the following lines to your .env
file:
PORT= # Port on which the API will be exposed
To build and start the API, run the following commands:
# Build the project
$> npm run build
# Start the API in production mode
$> npm start
To build and start the API, run the following commands:
# Start the API in development mode
$> npm run dev
To test the API, run the following command:
# Run the tests
$> npm run test
Type | URL |
---|---|
API | http://localhost:5000/api |
Documentation | http://localhost:5000/doc |