Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkhizeryounas/nanofunction
Microservice framework for nodejs
https://github.com/mkhizeryounas/nanofunction
Last synced: 11 days ago
JSON representation
Microservice framework for nodejs
- Host: GitHub
- URL: https://github.com/mkhizeryounas/nanofunction
- Owner: mkhizeryounas
- Created: 2018-10-05T14:16:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-10T12:18:14.000Z (over 6 years ago)
- Last Synced: 2025-01-18T22:48:14.592Z (25 days ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NanoFunction
## Introduction
> Asynchronous HTTP microservices using function based architecture.
## Code Samples
Create an index.js file and export a function that accepts the standard http.IncomingMessage and http.ServerResponse objects:
```
module.exports = (req, res) => {
res.json({
data: {
handle: "@mkhizeryounas"
}
});
};
```## Installation
```
npm install nanofunction --save
```Next, ensure that the main property inside package.json points to your microservice (which is inside index.js in this example case) and add a start script:
```
{
"main": "index.js",
"scripts": {
"start": "nanofunction index.js"
}
}
```