Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flawiddsouza/express-clone
A very rough lightweight drop-in replacement for express. Limited feature set.
https://github.com/flawiddsouza/express-clone
Last synced: about 12 hours ago
JSON representation
A very rough lightweight drop-in replacement for express. Limited feature set.
- Host: GitHub
- URL: https://github.com/flawiddsouza/express-clone
- Owner: flawiddsouza
- License: mit
- Created: 2021-04-14T14:18:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-23T14:42:56.000Z (over 1 year ago)
- Last Synced: 2024-10-12T13:13:14.100Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 33.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Usage:
```
npm install https://github.com/flawiddsouza/express-clone
```Sample Code:
```js
import express from 'express-clone'const app = express()
app.get('/', (req, res) => {
res.send('Home')
})app.get('/cat', (req, res) => {
res.send('Cat')
})app.get('/cat/:id', (req, res) => {
res.send(req.params)
})app.post('/cat', (req, res) => {
res.send(req.body)
})const port = 9000
app.listen(port, () => {
console.log(`Listening at http://localhost:${port}`)
})
```To Develop
```
git clone https://github.com/flawiddsouza/express-clone
cd express-clone
npm install
```While developing, to test the server:
```
node test-server.js
```Core code is in server.js