diff --git a/api/media/routes.js b/api/media/routes.js new file mode 100644 index 0000000..e69de29 diff --git a/api/router.js b/api/router.js index 9e96ca2..1e7a12a 100644 --- a/api/router.js +++ b/api/router.js @@ -4,6 +4,6 @@ import * as test from './test/routes' const router = new Router() -router.get('/api/test', test.testStatic) +router.get('/', test.testStatic) export default router diff --git a/config.js b/config.js index ed1768c..8e4bcbe 100644 --- a/config.js +++ b/config.js @@ -1,6 +1,5 @@ 'use strict' -const _ = require('lodash') const nconf = require('nconf') // Helper method for global usage. @@ -16,7 +15,14 @@ nconf.inTest = () => nconf.get('NODE_ENV') === 'test' // Load package.json for name and such let pckg = require('./package.json') -pckg = _.pick(pckg, ['name', 'version', 'description', 'author', 'license', 'homepage']) +pckg = { + name: pckg.name, + version: pckg.version, + description: pckg.description, + author: pckg.author, + license: pckg.license, + homepage: pckg.homepage, +} // Load overrides as first priority diff --git a/package.json b/package.json index f8a0e63..65e3c06 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "start": "node index.js", "test": "env NODE_ENV=test mocha --require babel-register --recursive --reporter dot", "docker": "docker run -it --rm --name my-running-script -v \"$PWD\":/usr/src/app -w /usr/src/app node:slim", - "docker:test": "npm run docker -- npm install && npm run test", - "docker:dev": "npm run docker -- npm install && npm run dev", - "docker:prod": "npm run docker -- npm install && npm run start" + "docker:test": "npm run docker -- npm install --no-optional && npm run test", + "docker:dev": "npm run docker -- npm install --no-optional && npm run dev", + "docker:prod": "npm run docker -- npm install --no-optional && npm run start" }, "repository": { "type": "git", @@ -33,6 +33,7 @@ "assert-extended": "^1.0.1", "mocha": "^4.0.1", "nodemon": "^1.12.1", - "request-json": "^0.6.2" + "request-json": "^0.6.2", + "sinon": "^4.1.3" } } diff --git a/test/media/routes.test.js b/test/media/routes.test.js new file mode 100644 index 0000000..e69de29 diff --git a/test/server.test.js b/test/server.test.js index 3b5605d..0430e88 100644 --- a/test/server.test.js +++ b/test/server.test.js @@ -11,7 +11,7 @@ describe('Server', () => { it('should run', () => assert.isFulfilled( - client.getAsync('/api/test') + client.getAsync('/') ) .then(data => { assert.ok(data)