GithubHelp home page GithubHelp logo

codeshala-innovation / nodejs-express-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 1.0 288 KB

NodeJS Boilerplate for REST API using express, Mongoose

License: MIT License

JavaScript 100.00%
nodejs express mongoose flowjs

nodejs-express-boilerplate's Introduction

Build Status codecov

NodeJS Boilerplate

NodeJS starter project started by codeShala, Nepal. Please free to contribute.

Technology Used

  • flow.js -- Static Type checking
  • express
  • mongoose
  • migrate-mongo -- Database migration

Running starter project

$ npm install
$ npm install -g migrate-mongo
$ migrate-mongo up
$ npm start

Migration script

Install

npm install -g migrate-mongo

Status

migrate-mongo status

Migrate

migrate-mongo up

Folder Structure

config: All config information.

test: Unit test folder

migrations: Database migration

nodejs-express-boilerplate's People

Contributors

codeshalainnovation avatar tolsee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

neymarsabin

nodejs-express-boilerplate's Issues

Ideas

This is a thread where we can discuss ideas making the boilerplate more usable.

Eslint

Add a Linter

  • husky
  • eslint
  • precommit-hook

Error while trying to run npm install

Error

Error While trying to clone and initialize the project using npm install

npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/sparse-bitfield-dc9faefd/test.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/sparse-bitfield-dc9faefd/.travis.yml'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/source-map-support-c47c28b6/register.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/ajv-270ea611/dist/ajv.min.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/source-map-support-c47c28b6/source-map-support.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/handlebars-585f08a8/dist/cjs/handlebars/decorators.js'
npm WARN tar ENOENT: no such file or directory, lstat '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/handlebars-585f08a8/dist/cjs/handlebars/decorators'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/saslprep-6bb686e5/generate-code-points.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/handlebars-585f08a8/dist/cjs/handlebars/exception.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/saslprep-6bb686e5/index.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/handlebars-585f08a8/dist/cjs/handlebars/helpers.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/saslprep-6bb686e5/LICENSE'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/saslprep-6bb686e5/readme.md'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/prettier-2ab2da4b/parser-typescript.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/json-schema-ref-parser-20cb7127/dist/ref-parser.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/source-map-a6d27542/dist/source-map.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/swagger-ui-dist-8451681c/swagger-ui-bundle.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/unicode-5.2.0-178f617b/Bidi_Class/Left_To_Right/regex.js'
npm WARN tar ENOENT: no such file or directory, open '/home/uvisgone/projects/projects/easygo-server/node_modules/.staging/unicode-5.2.0-178f617b/Bidi_Class/Left_To_Right/symbols.js'
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/event-stream/-/event-stream-3.3.6.tgz
npm ERR! 404 
npm ERR! 404  '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'easygo-server'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:

How to Reproduce

  • git clone https://github.com/Codeshala-Innovation/nodejs-express-boilerplate.git
  • npm install

Database migration

Though NoSQL does not require migration, We will need migration to cope up with the schema changes and expectation of some required fields.

Update Readme

Add more info in readme.
Let's discuss what things we can add.

Database schema clean up

We need a way to standardize created_at, updated_at update automatically. It's cumbersome to write it in every schema.

User auth service

  1. Signup
  2. Login
  3. Reset Password

Use jwt.
Do not use PassportJS as it is much of burden for a light project as this.

Add test for utils

There are test files for utils we need to add more test and coverage.

Add 2fa support

Add 2fa support for users. This should be matched with the frontend(maybe) or should provide a way to easily integrate.

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.