├── index.js ├── package.json └── README.md /index.js: -------------------------------------------------------------------------------- 1 | var http = require('http'); 2 | http.createServer(function (req, res) { 3 | console.log(`Just got a request at ${req.url}!`) 4 | res.write('Yo!'); 5 | res.end(); 6 | }).listen(process.env.PORT || 3000); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "starter-micro-api", 3 | "version": "1.0.0", 4 | "description": "Cyclic.sh micro api starter", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "", 10 | "license": "ISC", 11 | "dependencies": { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # starter-micro-api 2 | 3 | This is the simplest possible nodejs api using the base http library that responds to any request with: 4 | ``` 5 | Yo! 6 | ``` 7 | 8 | ## Deploy in under 10 seconds 9 | 10 | [![Deploy to Cyclic](https://deploy.cyclic.app/button.svg)](https://deploy.cyclic.app/) 11 | - Sets up instant continuous deployment on `git push` 12 | - Realtime backend logs and API request monitoring 13 | --------------------------------------------------------------------------------