https://github.com/orinak/axios-serve
Axios with net.Server
https://github.com/orinak/axios-serve
axios-ecosystem
Last synced: 3 months ago
JSON representation
Axios with net.Server
- Host: GitHub
- URL: https://github.com/orinak/axios-serve
- Owner: orinak
- Created: 2017-09-05T20:47:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-06T16:04:49.000Z (over 7 years ago)
- Last Synced: 2025-02-08T05:47:37.313Z (4 months ago)
- Topics: axios-ecosystem
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# axios-serve
Run [Axios][axios] with `net.Server` under the hood. Good for isolated tests.
[axios]: https://github.com/mzabriskie/axios
## Usage
```js
const Axios = require('axios-serve')const app = require('./app.js') // Express app
const request = Axios.createServer(app)
request.get('/')
.then(res => {
console.log(res.status === 200)
})
```Axios `defaults` and `interceptors` properties are available.
## Installation
Install using npm
```sh
npm install axios-serve
```## License
MIT