A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov# cURL
$ curl --location 'http://localhost:3000/file/upload' \
--form 'file=@"/path/bar.jpeg"' \
--form 'email="foo@gmail.com"'Many API endpoints return the JSON representation of the resources created or edited. However, if an invalid request is submitted, or some other error occurs, Gophish returns a JSON response in the following format:
{
"statusCode" : number,
"message" : string,
"data" : {
"requestId" : "string",
}
}The statusCode attribute contains the HTTP status code for the request. This is useful for debugging, as it can be used to quickly determine the type of error that is being returned.
The message attribute contains a message commonly used to indicate errors or, in the case of deleting a resource, success that the resource was properly deleted.
The data attribute contains any other metadata associated with the response. This will be an escaped JSON object containing the requestId of the request.
Gophish returns the following status codes in its API:
| Status Code | Description |
|---|---|
| 200 | OK |
| 201 | CREATED |
| 400 | BAD REQUEST |
| 404 | NOT FOUND |
| 500 | INTERNAL SERVER ERROR |
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.