A node
server with a set of RESTful
services using entirely TypeScript
language.
- TypeScript language
- Express + TypeScript plugin
- Experimental TypeScript decorators.
- TypeScript decorators for
RESTful
services
First, ensure you have the following installed:
- Node - Download and Install latest version of Node: NodeJS
- Git - Download and Install Git
- MongoDB -
npm install mongodb
- Cors -
npm i cors --save-dev @types/cors
- Express -
npm i express
After that, use Git bash
to run all commands if you are on Windows platform.
In order to start the project use:
$ git clone https://github.com/flowersmiling/coding-exercise-backend.git
$ cd coding-exercise-backend
You'll need to download some node modules defined into package.json
file.
npm install
Run the following command
npm build
This will generate a dist
directory(JavaScript output files).
npm start
Now open your browser here: http://localhost:3000/
You'll have available the following RESTful
services:
GET http://localhost:3000/tasks/doing
GET http://localhost:3000/tasks/done
POST http://localhost:3000/tasks
PUT http://localhost:3000/tasks/:id
DELETE http://localhost:3000/tasks
If you want to change the port, please update index.ts
file.
MIT