Skip to content

Commit

Permalink
Made the path the first parameter on the programmatic API
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Mar 8, 2017
1 parent 5b1d7bc commit 2db4dd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require('path')
// Packages
const dargs = require('dargs')

module.exports = (options = {}, directory = process.cwd()) => {
module.exports = (directory = process.cwd(), options = {}) => {
const scriptPath = path.join(__dirname, '..', 'bin', 'serve.js')
const aliases = {cors: 'o'}

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const serve = require('serve')
And call it with flags (run [this command](#options) for the full list):

```js
const server = serve({
const server = serve(__dirname, {
port: 1337,
ignore: ['node_modules']
})
Expand Down

0 comments on commit 2db4dd3

Please sign in to comment.