mvetois / ApiExpressStarter

Api starter with typescript and express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ApiExpressStarter

Starter project for Api with the framework Express.

GitHub GitHub package.json version GitHub Workflow Status

Languages and Frameworks

TypeScript NodeJS Express.js Swagger

Dependencies installation

To install the dependencies, run the following command:

# Install dependencies
$> npm install

Environment variables (optional)

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

Build and start the API

Production

To build and start the API, run the following commands:

# Build the project
$> npm run build

# Start the API in production mode
$> npm start

Development

To build and start the API, run the following commands:

# Start the API in development mode
$> npm run dev

Test the API

To test the API, run the following command:

# Run the tests
$> npm run test

Usefull links

Type URL
API http://localhost:5000/api
Documentation http://localhost:5000/doc

About

Api starter with typescript and express

License:MIT License


Languages

Language:TypeScript 100.0%