Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Mongoose | 25,731 | 181,203 | 11,412 | 15 hours ago | 758 | September 14, 2022 | 267 | mit | JavaScript | |
MongoDB object modeling designed to work in an asynchronous environment. | ||||||||||
Node Elm | 11,215 | a year ago | 62 | gpl-2.0 | JavaScript | |||||
基于 node.js + Mongodb 构建的后台系统 | ||||||||||
Node Express Boilerplate | 5,409 | a month ago | 10 | September 28, 2020 | 75 | mit | JavaScript | |||
A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose | ||||||||||
Node Express Mongoose Demo | 5,070 | 1 | 25 days ago | 1 | January 18, 2016 | 3 | mit | JavaScript | ||
A simple demo app using node and mongodb for beginners (with docker) | ||||||||||
Bulletproof Nodejs | 4,954 | 5 months ago | 68 | mit | TypeScript | |||||
Implementation of a bulletproof node.js API 🛡️ | ||||||||||
Builderbook | 3,486 | 4 months ago | 69 | mit | JavaScript | |||||
Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database. | ||||||||||
Saas | 3,322 | 4 months ago | 11 | mit | TypeScript | |||||
Build your own SaaS business with SaaS boilerplate. Productive stack: React, Material-UI, Next, MobX, WebSockets, Express, Node, Mongoose, MongoDB. Written with TypeScript. | ||||||||||
Express Mongoose Es6 Rest Api | 2,908 | 3 years ago | 1 | September 03, 2016 | 68 | mit | JavaScript | |||
:collision: A boilerplate application for building RESTful APIs Microservice in Node.js using express and mongoose in ES6 with code coverage and JsonWebToken Authentication | ||||||||||
Thal | 2,268 | 3 years ago | mit | JavaScript | ||||||
Getting started with Puppeteer and Chrome Headless for Web Scraping | ||||||||||
Mongodb Memory Server | 2,227 | 619 | 546 | a day ago | 282 | September 25, 2022 | 18 | mit | TypeScript | |
Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config). |
Also express-mongodb-rest-api-boilerplate - REST-API Boilerplate
Package | Description |
---|---|
bcryptjs | Optimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ bcrypt binding on node.js and also working in the browser. |
cors | CORS is a node.js package for providing a Connect/Express middleware that can be used to enable CORS with various options. |
crypto-random-string | Generate a cryptographically strong random string |
dotenv | Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology. |
ejs | Embedded JavaScript templates |
email-templates | Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more! Made for sending beautiful emails with Lad. |
express | Fast, unopinionated, minimalist web framework for node. |
express-graphql | Create a GraphQL HTTP server with any HTTP web framework that supports connect styled middleware, including Connect itself, Express and Restify. |
graphql | The JavaScript reference implementation for GraphQL, a query language for APIs created by Facebook. |
graphql-compose | GraphQL – is a query language for APIs. graphql-js is the reference implementation of GraphQL for nodejs which introduce GraphQL type system for describing schema (definition over configuration) and executes queries on the server side. express-graphql is a HTTP server which gets request data, passes it to graphql-js and returned result passes to response. |
graphql-compose-mongoose | This is a plugin for graphql-compose, which derives GraphQLType from your mongoose model. Also derives bunch of internal GraphQL Types. Provide all CRUD resolvers, including graphql connection, also provided basic search via operators ($lt, $gt and so on). |
i18next | i18next is a very popular internationalization framework for browser or any other javascript environment (eg. node.js). |
i18next-express-middleware | This is a middleware to use i18next in express.js. |
ioredis | A robust, performance-focused and full-featured Redis client for Node.js. |
jsonwebtoken | This was developed against draft-ietf-oauth-json-web-token-08. It makes use of node-jws |
module-alias | Create aliases of directories and register custom module paths in NodeJS like a boss! |
moment | A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. |
mongoose | Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Mongoose supports both promises and callbacks. |
nodemailer | Send e-mails from Node.js – easy as cake! |
validator | A library of string validators and sanitizers. |
winston | A logger for just about everything. |
Mac (using homebrew):
brew install redis
Linux:
sudo apt-get install redis-server
cd workspaces/api
cp .env.example .env
Note: I highly recommend installing nodemon.
nodemon is a tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.
nodemon does not require any additional changes to your code or method of development. nodemon is a replacement wrapper for node
, to use nodemon
replace the word node
on the command line when executing your script.
yarn global add nodemon
.
yarn start
yarn start:local # with nodemon
docker-compose up -d --build
docker-compose -f docker-compose.dev.yml up --build # with nodemon
yarn lint
yarn lint:write # with prefix --fix
├─ src
│ ├─ graphql
│ │ ├─ index.js
│ │ ├─ schema.js
│ │ └─ types.js
│ ├─ i18next
│ │ ├─ locales
│ │ │ ├─ en.json
│ │ │ └─ ge.json
│ │ └─ index.js
│ ├─ middleware
│ │ ├─ authentication.js
│ │ ├─ authMiddleware.js
│ │ └─ index.js
│ ├─ module
│ │ ├─ auth
│ │ │ ├─ mail
│ │ │ │ ├─ index.js
│ │ │ │ └─ userMail.js
│ │ │ ├─ service
│ │ │ │ ├─ index.js
│ │ │ │ └─ userService.js
│ │ │ ├─ index.js
│ │ │ ├─ resolvers.js
│ │ │ ├─ types.js
│ │ │ └─ user.js
│ │ └─ index.js
│ ├─ service
│ │ ├─ logger.js
│ │ └─ nodemailer.js
│ ├─ validator
│ │ ├─ index.js
│ │ └─ userValidator.js
│ ├─ view
│ │ └─ template
│ │ ├─ reset-password
│ │ │ └─ html.ejs
│ │ ├─ verify
│ │ │ └─ html.ejs
│ │ └─ verify-request
│ │ └─ html.ejs
│ ├─ index.js
│ ├─ mongoose.js
│ └─ redis.js
├─ .dockerignore
├─ .env.example
├─ .eslintignore
├─ .eslint
├─ .gitignore
├─ Dockerfile
├─ Dockerfile.dev
├─ LICENSE
├─ README.md
├─ docker-compose.dev.yml
├─ docker-compose.yml
└─ package.json
Note: To continue development, you should learn about graphql-compose - this is the library that I use to write the API, you can read about it at the link: docs
query user {
user {
_id
email
firstName
lastName
locale
account {
verification {
verified
}
}
updatedAt
createdAt
}
}
mutation signIn($email: String!, $password: String!) {
signIn(email: $email, password: $password) {
accessToken
}
}
mutation signUp($email: String!, $password: String!) {
signUp(email: $email, password: $password) {
accessToken
}
}
mutation logout {
logout {
succeed
}
}
mutation verifyRequest {
verifyRequest {
succeed
}
}
mutation verify($token: String!) {
verify(token: $token) {
accessToken
}
}
mutation resetPassword($email: String!) {
resetPassword(email: $email) {
succeed
}
}
mutation newPassword($token: String!, $newPassword: String!) {
newPassword(token: $token, newPassword: $newPassword) {
accessToken
}
}
mutation changePassword($currentPassword: String!, $newPassword: String!) {
changePassword(currentPassword: $currentPassword, newPassword: $newPassword) {
succeed
}
}
mutation updateUser($email: String!, $firstName: String!, $lastName: String!) {
updateUser(email: $email, firstName: $firstName, lastName: $lastName) {
_id
email
firstName
lastName
locale
account {
verification {
verified
}
}
updatedAt
createdAt
}
}
mutation switchLocale($locale: Locale!) {
switchLocale(locale: $locale) {
_id
email
firstName
lastName
locale
account {
verification {
verified
}
}
updatedAt
createdAt
}
}
Note: For any question issues
This project is an open-source with an MIT License