Skip to content

orinak/axios-serve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

axios-serve

Run Axios with net.Server under the hood. Good for isolated tests.

Usage

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

npm install axios-serve

License

MIT