@eslang/express
Version:
A wrapper of ExpressJS to simplify its usage in Espresso code.
32 lines (20 loc) • 794 B
Markdown
# Espresso Express
## Use it in your Espresso project
The project can be any type of default, app, module or api, which created by [es-npm](https://www.npmjs.com/package/@eslang/es-npm).
### add dependency
```shell
npm i --save @eslang/express
```
### use it in code
```python
const express (import "express");
# to create a plain ExpressJS app.
var app (express app);
# to create an ExpressJS app which supports Espresso data in request body.
var api (express api);
# to create an ExpressJS app which supports Espresso data in request body and
# allow requests from any origin when called in web browsers.
var service (express service);
```
Or just check how it's used in Espresso's [api project template](https://github.com/NirlStudio/es-npm-template-api).
**Enjoy the Espresso.**