Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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.

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