Skip to content

Commit

Permalink
feat: set fixturesUrl from NOW_URL if present
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Feb 11, 2018
1 parent 5ec06d0 commit b50ffe5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ const globTofixtures = require('../lib/glob-to-fixtures')

const DEFAULTS = require('../lib/defaults')

// NOW_URL: support deployment to now.sh: https://zeit.co/docs/features/env-and-secrets
const defaultFixtureUrl = process.env.NOW_URL || process.env.FIXTURES_URL || DEFAULTS.fixturesUrl

const { argv } = yargs.options({
port: {
type: 'number',
default: parseInt(process.env.PORT || DEFAULTS.port, 10)
},
'fixtures-url': {
type: 'string',
default: parseInt(process.env.FIXTURES_URL || DEFAULTS.fixturesUrl, 10)
default: defaultFixtureUrl
},
'log-level': {
type: 'string',
Expand Down

0 comments on commit b50ffe5

Please sign in to comment.