Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sina-byn/express-rest-snippets

a VS Code snippet extension to develop REST APIs with Express.js faster than ever
https://github.com/sina-byn/express-rest-snippets

expressjs extension javascript rest rest-api restful-api typescript vscode vscode-extension vscode-snippet vscode-snippets vscode-snippets-extension

Last synced: 6 days ago
JSON representation

a VS Code snippet extension to develop REST APIs with Express.js faster than ever

Awesome Lists containing this project

README

        

# Express REST Snippets

> The source code for this extension is available at https://github.com/sina-byn/express-rest-snippets.

## Example

Initialize an express server with `exp` :

```javascript
const express = require('express');

const app = express();

const port = process.env.PORT || 3000;

app.listen(port, () => {
console.log(`Server running at http://localhost:${port}`);
});
```

## Snippets

| Snippet | Description |
| :------ | --------------------------------------------- |
| `exp` | initialize an express server |
| `rtr` | initialize an express router |
| `mid` | add an express middleware |
| `rmid` | add an express router middleware |
| `emid` | add an express error middleware |
| `rt` | add an express route |
| `ctrl` | add an express controller |
| `res` | add an express response expression |
| `sres` | add an express success response expression |
| `eres` | add an express error response expression |
| `ncres` | add an express no-content response expression |

**Enjoy!**