Skip to content

TWU-C-Tech-Trainee/js-async-demo-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to use it

This repository is the backend API server. It exposes the following API:

URI METHOD Payload
api/message POST { text, complexity, error }. The text is the message you talked to the server. The complexity will determine how many seconds to delay before sending the response back. If error is true then the response status code will be 500, otherwise the status code will be 200.

To run the server. Please enter the following command in your terminal (or PowerShell in Windows).

$ npm install
$ npm start

You can change npm to cnpm to download packages from Ali mirror.

The server will listen to port 3000 by default. To stop the server, press Ctrl+C.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published