A progressive Node.js framework for building efficient and scalable server-side applications.
Sample ChatApp backend server written in NestJS for educational purposes.
This is a PoC repo, the project has been moved to a monorepo at https://github.com/Substancia/REACTive-cucumber-NEST.
Nest framework TypeScript starter repository.
$ yarn install
NOTE: This app is set to run on port 4200 (instead of conventional 3000).
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
Follow https://github.com/Substancia/kubernetes-chatapp
POST /user/login
- API to login an existing user
// Request payload
{
username: string; // try 'sentienta'
password: string; // try 'asd'
}
// Response payload
{
authStatus: boolean;
description: string;
accessToken: string | undefined;
}
POST /user/signup
- API to signup a new user
// Request payload
{
username: string;
password: string;
}
// Response payload
{
status: string; // 'success' | 'failed'
}
POST /message/fetch
- API to fetch messages
// Request payload
{
chatId: string; // value 'main_group_chat' exists in the mock
}
// Request headers
{
'x-access-token': string; // accessToken fetched from login API
}
// Response payload
{
messages: {
author: string;
message: string;
timestamp: number;
}[]
}
POST /message/send
- API to send messages
// Request payload
{
chatId: string; // value 'main_group_chat' exists in the mock
author: string;
message: string;
timestamp: number;
}
// Request headers
{
'x-access-token': string; // accessToken fetched from login API
}
// Response payload
{
status: string; // 'success' | 'failed'
}
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Author - Kamil Myśliwiec
- Website - https://nestjs.com
- Twitter - @nestframework
Nest is MIT licensed.