GithubHelp home page GithubHelp logo

kunalkapadia / express-mongoose-es6-rest-api Goto Github PK

View Code? Open in Web Editor NEW
2.9K 113.0 695.0 304 KB

:collision: A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication

Home Page: http://kunalkapadia.github.io/express-mongoose-es6-rest-api/

License: MIT License

JavaScript 95.16% Shell 2.19% Dockerfile 2.65%
es6 express node mongoose babel eslint jsonwebtoken bluebird coverage mongodb

express-mongoose-es6-rest-api's Introduction

Express & mongoose REST API Boilerplate in ES6 with Code Coverage Awesome

Build Status Coverage Status Code Climate bitHound Overall Score bitHound Dependencies Commitizen friendly MIT License PRs Welcome Support via Paypal

Express ES6 REST API Starter

Sponsor

You can support the project by checking out our sponsor page. It takes only one click:

Some great stuff

Overview

This is a boilerplate application for building REST APIs in Node.js using ES6 and Express with Code Coverage and JWT Authentication. Helps you stay productive by following best practices. Follows Airbnb's Javascript style guide.

Heavily inspired from Egghead.io - How to Write an Open Source JavaScript Library.

Features

Feature Summary
ES6 via Babel ES6 support using Babel.
Authentication via JsonWebToken Supports authentication using jsonwebtoken.
Code Linting JavaScript code linting is done using ESLint - a pluggable linter tool for identifying and reporting on patterns in JavaScript. Uses ESLint with eslint-config-airbnb, which tries to follow the Airbnb JavaScript style guide.
Auto server restart Restart the server using nodemon in real-time anytime an edit is made, with babel compilation and eslint.
ES6 Code Coverage via istanbul Supports code coverage of ES6 code using istanbul and mocha. Code coverage reports are saved in coverage/ directory post yarn test execution. Open coverage/lcov-report/index.html to view coverage report. yarn test also displays code coverage summary on console. Code coverage can also be enforced overall and per file as well, configured via .istanbul.yml
Debugging via debug Instead of inserting and deleting console.log you can replace it with the debug function and just leave it there. You can then selectively debug portions of your code by setting DEBUG env variable. If DEBUG env variable is not set, nothing is displayed to the console.
Promisified Code via bluebird We love promise, don't we ? All our code is promisified and even so our tests via supertest-as-promised.
API parameter validation via express-validation Validate body, params, query, headers and cookies of a request (via middleware) and return a response with errors; if any of the configured validation rules fail. You won't anymore need to make your route handler dirty with such validations.
Pre-commit hooks Runs lint and tests before any commit is made locally, making sure that only tested and quality code is committed
Secure app via helmet Helmet helps secure Express apps by setting various HTTP headers.
Uses yarn over npm Uses new released yarn package manager by facebook. You can read more about it here
  • CORS support via cors
  • Uses http-status to set http status code. It is recommended to use httpStatus.INTERNAL_SERVER_ERROR instead of directly using 500 when setting status code.
  • Has .editorconfig which helps developers define and maintain consistent coding styles between different editors and IDEs.

Getting Started

Clone the repo:

git clone [email protected]:kunalkapadia/express-mongoose-es6-rest-api.git
cd express-mongoose-es6-rest-api

Install yarn:

npm install -g yarn

Install dependencies:

yarn

Set environment (vars):

cp .env.example .env

Start server:

# Start server
yarn start

# Selectively set DEBUG env var to get logs
DEBUG=express-mongoose-es6-rest-api:* yarn start

Refer debug to know how to selectively turn on logs.

Tests:

# Run tests written in ES6 
yarn test

# Run test along with code coverage
yarn test:coverage

# Run tests on file change
yarn test:watch

# Run tests enforcing code coverage (configured via .istanbul.yml)
yarn test:check-coverage

Lint:

# Lint code with ESLint
yarn lint

# Run lint on any file change
yarn lint:watch

Other gulp tasks:

# Wipe out dist and coverage directory
gulp clean

# Default task: Wipes out dist and coverage directory. Compiles using babel.
gulp
Deployment
# compile to ES5
1. yarn build

# upload dist/ to your server
2. scp -rp dist/ user@dest:/path

# install production dependencies only
3. yarn --production

# Use any process manager to start your services
4. pm2 start dist/index.js

In production you need to make sure your server is always up so you should ideally use any of the process manager recommended here. We recommend pm2 as it has several useful features like it can be configured to auto-start your services if system is rebooted.

Logging

Universal logging library winston is used for logging. It has support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file. We just log to the console for simplicity, you can configure more transports as per your requirement.

API logging

Logs detailed info about each api request to console during development. Detailed API logging

Error logging

Logs stacktrace of error to console along with other details. You should ideally store all error messages persistently. Error logging

Code Coverage

Get code coverage summary on executing yarn test Code Coverage Text Summary

yarn test also generates HTML code coverage report in coverage/ directory. Open lcov-report/index.html to view it. Code coverage HTML report

Docker

Using Docker Compose for Development

# service restarts on file change
bash bin/development.sh

Building and running without Docker Compose

# To use this option you need to make sure mongodb is listening on port 27017

# Build docker 
docker build -t express-mongoose-es6-rest-api .

# Run docker
docker run -p 4040:4040 express-mongoose-es6-rest-api

A Boilerplate-only Option

If you would prefer not to use any of our tooling, delete the following files from the project: package.json, gulpfile.babel.js, .eslintrc and .travis.yml. You can now safely use the boilerplate with an alternative build-system or no build-system at all if you choose.

Docs and Recipes

  • Gulp recipes - the official Gulp recipes directory includes a comprehensive list of guides for different workflows you can add to your project.

Contributing

Contributions, questions and comments are all welcome and encouraged. For code contributions submit a pull request with unit test.

License

This project is licensed under the MIT License

Support Development

If this project saved your valuable time in getting your service up, and you feel like buying me coffee, you can donate either at my BTC address: 1LkW5UoERR1jjJsChMheKuo6vn95x2mzWg or at Support via Paypal

Your support is greatly appreciated.

Meta

Kunal Kapadia โ€“ @kunalkapadia12 โ€“ [email protected]

express-mongoose-es6-rest-api's People

Contributors

dalanir avatar delsner avatar eyalcohen4 avatar greenkeeperio-bot avatar hananbo avatar kunalkapadia avatar maxsbelt avatar osahner avatar rafaelhz avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

express-mongoose-es6-rest-api's Issues

gitignore OS files

Hey, first of all great starter kit.

I've recently started playing with it and its awesome. I looked into the gitignore file and there isn't mentioned any script for ignoring OS specific files. Are PRs welcomed? If you agree this, needs to be added I'd be more than happy to contribute.

Serving Static Assets Fails

How can I serve static files from current working directory. I have added public folder in root and it doesn't serve

app.use('/static', () => {
  let cwd = path.join(process.cwd());
  let staticfiles = path.resolve(cwd, 'public');
  return express.static(staticfiles);
});

have problem in auth

i find the user's CRUD don't have auth, i hope it have a permission control, so that the administrator can handle the user instead of visitors

express validation on param converter

Hi,

How I can use validation in a param converter?
I wanted to use Joi.objectId () to validate that this is a mongodb valid id

router.route('/:id')
  /** GET /api/users/:userId - Get user */
  .get(validate(paramValidation.get),userCtrl.get)

  /** PUT /api/users/:userId - Update user */
  .put(validate(paramValidation.updateUser), userCtrl.update)

  /** DELETE /api/users/:userId - Delete user */
  .delete(validate(paramValidation.deleteUser), userCtrl.remove);

/** Load user when API with userId route parameter is hit */
router.param('id', userCtrl.load);

Thanks and regards

server error

{"message":"Not Found","stack":"Error: API not found\n at APIError.ExtendableError (d:\Dev\express-mongoose-es6-rest-api-master\server1\dist\server\helpers\APIError.js:35:11)\n at new APIError (d:\Dev\express-mongoose-es6-rest-api-master\server1\dist\server\helpers\APIError.js:63:77)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\dist\config\express.js:122:13\n at Layer.handle as handle_request\n at trim_prefix (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:312:13)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:280:7\n at Function.process_params (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:330:12)\n at next (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:271:10)\n at Layer.handle as handle_request\n at trim_prefix (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:312:13)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:280:7\n at Function.process_params (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:330:12)\n at next (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:271:10)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express-winston\index.js:291:9\n at Layer.handle as handle_request\n at trim_prefix (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:312:13)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:280:7\n at Function.process_params (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:330:12)\n at next (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\express\lib\router\index.js:271:10)\n at cors (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\cors\lib\index.js:178:7)\n at d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\cors\lib\index.js:228:17\n at originCallback (d:\Dev\express-mongoose-es6-rest-api-master\server1\node_modules\cors\lib\index.js:217:15)"}

Pass req.body directly into mongoose model?

I notice that this project reads every single parameter from req.body into a new object just to create the database instance from it. Example from user.controller.js:

function create(req, res, next) {
  const user = new User({
    username: req.body.username,
    mobileNumber: req.body.mobileNumber
  });

  user.save()
    .then(savedUser => res.json(savedUser))
    .catch(e => next(e));
}

Is there a reason for that? Why not simply to new User(req.body)?

Cant run tests on windows

Running yarn test I am getting an error saying that NODE_ENV is not recognized as a command. The line which is being run: NODE_ENV=test babel-node node_modules/.bin/isparta cover _mocha -- --ui bdd --reporter spec --colors --compilers js:babel-core/register ./server/**/*.test.js

Mongoose debug

Add mongoose debug

+if (process.env['MONGOOSE_DEBUG']) {

  • mongoose.set('debug', function (collectionName, method, query, doc) {
  • console.log(
  •  `${collectionName}.${method}`,
    
  •  require('util').inspect(query, false, 20),
    
  •  doc
    
  • )
  • })
    +}

'gulp serve' not running in Node.js 6.2.2(NPM 3.9.5)

After running 'npm install', I tried to run 'gulp serve'.
I am getting the following error:

[12:57:48] Failed to load external module babel-register
[12:57:48] Failed to load external module babel-core/register
[12:57:48] Failed to load external module babel/register
/Volumes/MACDATA/Current_Work/uslikey/project/express-mongoose-es6-rest-api/gulpfile.babel.js:1
(function (exports, require, module, __filename, __dirname) { import gulp from 'gulp';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:513:28)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Liftoff.handleArguments (/usr/local/lib/node_modules/gulp/bin/gulp.js:116:3)
at Liftoff. (/usr/local/lib/node_modules/gulp/node_modules/liftoff/index.js:193:16)

So I installed 'babel-register', 'babel-core/register' and 'babel/register' by 'npm install' .
After that, when I run 'gulp serve' I faced the following:

[13:15:23] Requiring external module babel-register
module.js:442
throw err;
^

Error: Cannot find module './_baseClone'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/Volumes/MACDATA/Current_Work/uslikey/project/express-mongoose-es6-rest-api/node_modules/babel-plugin-add-module-exports/node_modules/babel-template/node_modules/lodash/cloneDeep.js:1:79)
at Module._compile (module.js:541:32)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)

Everything was all right in Node.js 4.4.3

App crashes after a fresh install

gulp serve fails.

$ gulp serve
[19:17:41] Requiring external module babel-register
[19:17:42] Using gulpfile ~/tmp_clones/express-mongoose-es6-rest-api/gulpfile.babel.js
[19:17:42] Starting 'clean'...
[19:17:42] Finished 'clean' after 5.76 ms
[19:17:42] Starting 'serve'...
[19:17:42] Starting 'lint'...
[19:17:42] Starting 'copy'...
[19:17:42] Starting 'babel'...
[19:17:42] Finished 'serve' after 132 ms
[19:17:49] Finished 'copy' after 6.81 s
[19:17:50] Finished 'lint' after 8.47 s
[19:17:50] Finished 'babel' after 8.36 s
[19:17:50] Starting 'nodemon'...
[19:17:50] Finished 'nodemon' after 76 ms
[19:17:50] [nodemon] 1.9.2
[19:17:50] [nodemon] to restart at any time, enter `rs`
[19:17:50] [nodemon] watching: *.*
[19:17:50] [nodemon] starting `node dist/index.js`
/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb/lib/server.js:242
        process.nextTick(function() { throw err; })
                                      ^

Error: unable to connect to database: mongodb://localhost/express-mongoose-es6-rest-api-development
    at NativeConnection.<anonymous> (/Users/user/tmp_clones/express-mongoose-es6-rest-api/dist/index.js:31:8)
    at emitOne (events.js:90:13)
    at NativeConnection.emit (events.js:182:7)
    at NativeConnection.Connection.error (/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongoose/lib/connection.js:449:8)
    at /Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongoose/lib/connection.js:478:15
    at /Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:69:21
    at /Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb/lib/db.js:231:14
    at null.<anonymous> (/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb/lib/server.js:240:9)
    at g (events.js:273:16)
    at emitTwo (events.js:100:13)
    at emit (events.js:185:7)
    at null.<anonymous> (/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb-core/lib/topologies/server.js:218:12)
    at g (events.js:273:16)
    at emitTwo (events.js:100:13)
    at emit (events.js:185:7)
    at null.<anonymous> (/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb-core/lib/connection/pool.js:119:12)
    at g (events.js:273:16)
    at emitTwo (events.js:100:13)
    at emit (events.js:185:7)
    at Socket.<anonymous> (/Users/user/tmp_clones/express-mongoose-es6-rest-api/node_modules/mongodb-core/lib/connection/connection.js:151:49)
    at Socket.g (events.js:273:16)
    at emitOne (events.js:90:13)
[19:17:51] [nodemon] app crashed - waiting for file changes before starting...

Gulp is starting twice

I don't know whether this is a intended or not but this is quite slow when on development.
*You can produce the same result just by changing /api/health-care response text from OK to anything
Any Solution?

image

Server not refreshing correctly.

First time for using this package. After following the install procedures, getting the server up, running and listening, I have tried to post a user to test the next step of the API... The response I got was....


{
  "message": "\"mobileNumber\" with value \"07834368491\" fails to match the required pattern: /^[1-9][0-9]{9}$/",
  "stack": "Error: \"mobileNumber\" with value \"07834368491\" fails to match the required pattern: /^[1-9][0-9]{9}$/\n    at APIError.ExtendableError (E:\\napi\\dist\\server\\helpers\\APIError.js:35:11)\n    at new

Which is legitimate, however - even when I change the user model to the following:

const UserSchema = new mongoose.Schema({
  username: {
    type: String,
    required: true
  },
/*  mobileNumber: {
    type: String,
    required: true
  },*/
  createdAt: {
    type: Date,
    default: Date.now
  }
});

I still get the same error - this happens despite doing a clear restart of the server (which I think it does automatically anyway) or even the computer. Any ideas would be greatly appreciated.

Thanks

Dan

Error type is always 'Error'

Line 67 of code file ./config/express.js:

const err = new APIError('API not found', httpStatus.NOT_FOUND);

put following code after the above:

console.log(err instanceof APIError); // output false

To my understanding, the output should be true, since err is an instance of APIError?

node version 6.2.0

Thanks,

Great workflow to develop

Hello,
I am using express-mongoose-es6-rest-api to build my REST API,
thanks for the product I am very like it!

But issue that it requires enough time to me to debug any error while development and write code for next feature

My workflow is:

  1. Run npm start with nodemon in one console
  2. Run npm test in other console (with nodemon, nodemon /usr/bin/gulp test)
  3. I write one test for feature and I expect the test to be not passed (red)
  4. I do one small change and see - test is passed (green) or still red
  5. If test is still red then I change my code again until the test becomes green
  6. When test is green then I repeat 3-6 steps for next feature

The issue is that each time when I change my code it requires >=7 seconds to get javascript code from source (clean, link, copy, babel) (1) and also >=3 seconds to run tests (2). It is >=10 seconds total per iteration. So just to change one word in my code or add one space I need to wait within 10 seconds each time. I can disable link task while development and run it before commit only but (1) task still requires >=4 seconds and it is not enough fast

Could you offer me best approach or workflow to debug and develop?

Istanbul issue in Windows

Hi,

When run the test script, I got the same error as here.
I am running under windows (node v5).

Any hint to solve it ?

I cant serve Any static file

Im have image file in my public folder and added this code but it's not working :
app.use("/public", express.static(path.join(__dirname, '/public')));

path issue

When running your code i get the following error:

    /express-mongoose-es6-rest-api/node_modules/kew/kew.js:198
          throw e
          ^
    TypeError: Path must be a string. Received undefined

I am working on figuring out what the problem is now, but thought I'd post it here so you would be aware of it.

I cloned it down, cd'd into it, ran NPM install, and then DEBUG=express-mongoose-es6-rest-api:* npm start

So, I am assuming there is some variable that isn't being set, because of the udefined. Still tracing it. I'll update this once I find something.

Coverage failed

Hi, I am having problems with the plugin gulp -istanbul.

When I do commit, all tests are passed but the process fails to make the coverage

  38 passing (4s)

=============================== Coverage summary ===============================
Statements   : 89.46% ( 1163/1300 ), 75 ignored
Branches     : 84.71% ( 277/327 ), 85 ignored
Functions    : 73.48% ( 241/328 ), 1 ignored
Lines        : 85.86% ( 777/905 )
================================================================================
[13:58:10] 'test' errored after 9.18 s
[13:58:10] Error in plugin 'gulp-istanbul'
Message:
    Coverage failed
[13:58:10] Error in plugin 'run-sequence(test)'
Message:
    Coverage failed
Stack:
    at finish (/home/sergio/proyects/instangular-rest-api/node_modules/run-sequence/index.js:56:13)
    at Gulp.onError (/home/sergio/proyects/instangular-rest-api/node_modules/run-sequence/index.js:67:4)
    at emitOne (events.js:82:20)
    at Gulp.emit (events.js:169:7)
    at Gulp.Orchestrator._emitTaskDone (/home/sergio/proyects/instangular-rest-api/node_modules/orchestrator/index.js:264:8)
    at /home/sergio/proyects/instangular-rest-api/node_modules/orchestrator/index.js:275:23
    at finish (/home/sergio/proyects/instangular-rest-api/node_modules/orchestrator/lib/runTask.js:21:8)
    at DestroyableTransform.<anonymous> (/home/sergio/proyects/instangular-rest-api/node_modules/orchestrator/lib/runTask.js:52:4)
    at DestroyableTransform.f (/home/sergio/proyects/instangular-rest-api/node_modules/once/once.js:17:25)
    at emitOne (events.js:82:20)
    at DestroyableTransform.emit (events.js:169:7)
    at DestroyableTransform.<anonymous> (/home/sergio/proyects/instangular-rest-api/node_modules/gulp-istanbul/index.js:178:12)
    at emitNone (events.js:72:20)
    at DestroyableTransform.emit (events.js:166:7)
    at endReadableNT (/home/sergio/proyects/instangular-rest-api/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:865:12)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickDomainCallback (node.js:397:17)
[13:58:10] completed !!
npm ERR! Test failed.  See above for more details.

How API Port Change ?

I'm just port change.

I'm change source code in config/env port is 3001.

After All API response is "API Not Found".

even also health check API result is same.

Error: API not found at APIError.ExtendableError

Help. I just clone it and run it and got this error below. Please help. Thanks.
Error: API not found at APIError.ExtendableError

{"message":"Not Found","stack":"Error: API not found\n at APIError.ExtendableError (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/dist/server/helpers/APIError.js:35:11)\n at new APIError (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/dist/server/helpers/APIError.js:63:77)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/dist/config/express.js:122:13\n at Layer.handle as handle_request\n at trim_prefix (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:312:13)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:280:7\n at Function.process_params (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:330:12)\n at next (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:271:10)\n at Layer.handle as handle_request\n at trim_prefix (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:312:13)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:280:7\n at Function.process_params (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:330:12)\n at next (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:271:10)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express-winston/index.js:291:9\n at Layer.handle as handle_request\n at trim_prefix (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:312:13)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:280:7\n at Function.process_params (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:330:12)\n at next (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/express/lib/router/index.js:271:10)\n at cors (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/cors/lib/index.js:178:7)\n at /Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/cors/lib/index.js:228:17\n at originCallback (/Users/joseph/Documents/node-heroku/express-mongoose-es6-rest-api/node_modules/cors/lib/index.js:217:15)"}

Node v6.3.1
NPM v3.10.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.