Node.js express.js MongoDB JWT REST API - Basic Project Skeleton

Overview

Node.js express.js MongoDB JWT REST API - Basic Project Skeleton

Author Software License Tag Travis npm downloads Codacy Badge

Getting started

This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API)

This project is created to help other developers create a basic REST API in an easy way with Node.js. This basic example shows how powerful and simple JavaScript can be. Do you want to contribute? Pull requests are always welcome to show more features.

Buy me a coffee

Hi! I'm Daniel Avellaneda, I'm an open source enthusiast and devote my free time to building projects in this field.

I'm the creator and maintainer of node-express-mongodb-jwt-rest-api-skeleton and vue-skeleton-mvp

These projects are a "starter web app kit" for any developer who wants to build their own app without starting from scratch: API + Frontend

Both projects have been downloaded thousands of times by web developers around the world.

I'm doing my best to provide you a good experience when using my apps, so if you like what I'm doing and wish to say "thanks!", please buy me a coffee

Buy Me A Coffee

Feel free to send me a tweet https://twitter.com/davellanedam, share this with others or make a pull request

Features

  • Multiple environment ready (development, production)
  • Custom email/password user system with basic security and blocking for preventing brute force attacks.
  • Compressed responses.
  • Secured HTTP headers.
  • CORS ready.
  • Cache ready (Redis).
  • HTTP request logger in development mode.
  • i18n ready (for sending emails in multiple languages).
  • User roles.
  • Pagination ready.
  • User profile.
  • Users list for admin area.
  • Cities model and controller example.
  • Login access log with IP, browser and country location (for country it looks for the header cf-ipcountry that CloudFlare creates when protecting your website).
  • API autogenerated documentation by Postman.
  • API collection example for Postman.
  • Testing with mocha/chai for API endpoints.
  • NPM scripts for cleaning and seeding the MongoDB database.
  • NPM script for keeping good source code formatting using prettier and ESLint.
  • Use of ESLint for good coding practices.
  • Mailer example with Nodemailer and Mailgun.
  • Ability to refresh token
  • JWT Tokens, make requests with a token after login with Authorization header with value Bearer yourToken where yourToken is the signed and encrypted token given in the response from the login process.

Requirements

  • Node.js 10+
  • MongoDB 3.6+
  • Redis 5.0+

Demo

A demo of this API is located at: https://api-demo.daniel-avellaneda.com

Login credentials

email: [email protected]
password: 12345

IMPORTANT: Database resets every 30 mins like "12:00am, 12:30am, 1:00am" and so on. So anything you do with the API will be lost after a short time.

API documentation
Postman API example collection
If you want to test it don´t forget to change the server variable to:
https://api-demo.daniel-avellaneda.com

Demo is also linked to a VueJS project that shows how this API can be integrated to a frontend that is able to consume an API.
Repo is here: https://github.com/davellanedam/vue-skeleton-mvp
Running demo is here: https://vue-demo.daniel-avellaneda.com

How to install

Using Git (recommended)

  1. Clone the project from github. Change "myproject" to your project name.
git clone https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton.git ./myproject

Using manual download ZIP

  1. Download repository
  2. Uncompress to your desired directory

Install npm dependencies after installing (Git or manual download)

cd myproject
npm install
npm update

Setting up environments (development or production)

  1. In the root this repository you will find a file named .env.example
  2. Create a new file by copying and pasting the file and then renaming it to just .env
  3. The file .env is already ignored, so you never commit your credentials.
  4. Change the values of the file to your environment (development or production)
  5. Upload the .env to your environment server(development or production)
  6. If you use the postman collection to try the endpoints, change value of the variable server on your environment to the url of your server, for development mode use http://localhost:3000

IMPORTANT: By default token expires in 3 days (4320 minutes set in .env.example). You can refresh token at endpoint GET /token. If everything it´s ok you will get a new token.

Mailer

To ensure the deliverability of emails sent by this API, Mailgun is used for mailing users when they sign up, so if you want to use that feature go sign up at their website https://www.mailgun.com

If you want to try a different method it´s ok, I used https://nodemailer.com for this API and they have different transport methods like: smtp.

i18n

Language is automatically detected from Accept-Language header on the request. So either you send locale manually on the request or your browser will send its default, if Accept-Language header is not sent then it will use en locale as default.

How to run

Database cleaning and seeding samples

There are 3 available commands for this: fresh, clean and seed.

npm run command
  • fresh cleans and then seeds the database with dynamic data.
  • clean cleans the database.
  • seed seeds the database with dynamic data.

Running in development mode (lifting API server)

npm run dev

You will know server is running by checking the output of the command npm run dev

****************************
*    Starting Server
*    Port: 3000
*    NODE_ENV: development
*    Database: MongoDB
*    DB Connection: OK
****************************

Running tests

It´s a good practice to do tests at your code, so a sample of how to do that in mocha/chai is also included in the /test directory

npm run test

Formatting code

Format your code with prettier by typing:

npm run format

Formatting markdown files

Format all your markdown files with remark by typing:

npm run remark

Linting code

Lint your code with ESLint by typing:

npm run lint

Usage

Once everything is set up to test API routes either use Postman or any other api testing application. Default username/password combination for login is [email protected]/12345.

API documentation

https://documenter.getpostman.com/view/487539/RWaHwoLV

Postman API example collection

You can import the example collection to Postman. To import, click the import button located and select postman-example.json located within the root directory.

Go to manage environments to create environments for development, production, etc. On each of the environments you create you will need to:

  1. Create a new key authToken and within the /login request this value is automatically updated after a successfull login through a script located in the tests tab. Each time you make a request to the API it will send Authorization header with the token value in the request, you can check this on the headers of users or cities endpoints in the Postman example.

  2. Create a second key server with the url of your server, for development mode use http://localhost:3000

This is a REST API, so it works using the following HTTP methods:

  • GET (Read): Gets a list of items, or a single item
  • POST (Create): Creates an item
  • PATCH (Update): Updates an item
  • DELETE: Deletes an item

Creating new models

If you need to add more models to the project just create a new file in /app/models/ and it will be loaded dynamically.

Creating new routes

If you need to add more routes to the project just create a new file in /app/routes/ and it will be loaded dynamically.

Creating new controllers

When you create a new controller, try to also create another folder with validations and helpers. Ex. /countries, /countries/validators and /countries/helpers. An example of this is included in the repository.

Bugs or improvements

Feel free to report any bugs or improvements. Pull requests are always welcome.

License

This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

Comments
  • MognoAltas issue ?

    MognoAltas issue ?

    Doubt. Since a few months ago I am a user of your repository and I have several projects in production using, in 2 of these projects I have had the same problem. Which I don't know if it's something in the code or more in the server configuration. As I mentioned it is just a query to know if the same thing has happened to someone else. The problem is that I have a connection with MongoAtlas and suddenly the connection number goes up to the limit. Attached are screenshots of two projects

    image

    image

    I understand that it can be assumed of an increase of users using the application, but the truth is that it is not the case the number of users is relatively equal always

    Thank you !

    opened by leifermendez 6
  • Correct syntax for Redis cache

    Correct syntax for Redis cache

    Hello, Thank you for this wonderful API skeleton, it helps a lot.

    Trying to enable Redis cache, I got this error:

    Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379

    Changing connection syntax to this:

        engine: require('expeditious-engine-redis')({
          redis: {
            host: process.env.REDIS_HOST,
            port: process.env.REDIS_PORT
          }
        })
    

    fixed the error for me. Thank you.

    opened by Amine27 5
  • Filter on objectid

    Filter on objectid

    I want to be able to search for all cities I created (for example).

    If I add a 'userid' field to the cities model then I want to be able to

    cities?filter=5aa1c2c35ef7a4e97b5e995b&fields=userid&limit=2&page=1

    That way, I can utilise the pagination pattern built into the API.

    I can add in query['userId'] = new ObjectId(req.user.id) to the controller but this feels like a workaround to the pattern.

    opened by neural9 5
  • Util for accessing userId from token

    Util for accessing userId from token

    When business logic requires a userId to do something such as create a new City, the userId should be pulled from the encrypted JWT and therefore the engineer needs easy access to that ID.

    opened by neural9 5
  • Not standardized response on error

    Not standardized response on error

    When fetching data from the backend you got a response object. When there are errors the object is called 'errors' and if the errors are from validation, you get an array with the location, param, value and msg.

    The problem is with POST /register, when you send an incorrect email like "[email protected]" you don't get the validation error object, just a plain error object:

    Object errors: msg: "User validation failed: email: EMAIL_IS_NOT_VALID" proto: Objec t__proto__: Object

    Instead of:

    Object errors: msg: Array(1) 0: {location: "body", param: "email", value: "[email protected]", msg: "EMAIL_IS_NOT_VALID"} length: 1 proto: Array(0) proto: Object proto: Object

    On the other hand, if you send an invalid email in POST /login you get the right validation error.

    It's possible to standardize all errors to just get WHATEVER_WHATEVER (like IS_EMPTY)?

    opened by ramoncardena 4
  • Validation results are doubled

    Validation results are doubled

    Validation results are doubled when calling API with zero parameters.

    On a post to /cities with nothing added other than bearer token for example, the following occurs:

    {
        "errors": {
            "msg": [
                {
                    "location": "body",
                    "param": "name",
                    "msg": "MISSING"
                },
                {
                    "location": "body",
                    "param": "name",
                    "msg": "IS_EMPTY"
                }
            ]
        }
    }
    
    opened by neural9 3
  • Email Links Not Working

    Email Links Not Working

    @davellanedam I am registering a new user and an email has been sent, however, the verification link emailed is in the format [FRONTEND_URL]/verify/[VERIFICATION] while the verify method called by the endpoint upon clicking the link is looking for an id in the POST request. This yields the error: {"errors":{"msg":"URL_NOT_FOUND"}}

    Unit tests do not reveal this issue as the generated verification code is returned in development mode but not in production.

    I believe the same applies to the Reset Password email. Please take a look.

    opened by olafwrieden 3
  • Password not hashed when updating in profile

    Password not hashed when updating in profile

    Describe the bug When I try to change password, the patch method on profile works, but saves the password without hashing it.

    To Reproduce Steps to reproduce the behavior: Call http://localhost:5000/profile with { "password": "newpassword" } as body.

    The result is the profile object and when you check the Mongo db, you see the password field un-hashed.

    opened by ramoncardena 3
  • Duplicate user creation flow

    Duplicate user creation flow

    There are two API endpoints for user creation:

    • POST /register (doesn't require auth) [auth.register]
    • POST /users (requires Admin level auth) [user.createItem]

    The only difference is that POST /users allows predefinition of the 'role' field. From what I could understand, this solves a very niche problem of giving Admin higher authority to create accounts (by allowing one additional field). Is this all there is to this, or am I missing some important usage here? Was this the intended behaviour and difference between the two?

    opened by ccpandhare 2
  • [Security] Bump mongoose from 5.7.1 to 5.7.6

    [Security] Bump mongoose from 5.7.1 to 5.7.6

    Bumps mongoose from 5.7.1 to 5.7.6.

    Changelog

    Sourced from mongoose's changelog.

    5.7.6 / 2019-10-21

    • fix: upgrade mongodb driver -> 3.3.3 to fix issue with failing to connect to a replica set if one member is down #8209
    • fix(document): fix TypeError when setting a single nested subdoc with timestamps #8251
    • fix(cursor): fix issue with long-running eachAsync() cursor #8249 #8235
    • fix(connection): ensure repeated close events from useUnifiedTopology don't disconnect Mongoose from replica set #8224
    • fix(document): support calling Document constructor directly in Node.js #8237
    • fix(populate): add document array subpaths to parent doc populated() when calling DocumentArray#push() #8247
    • fix(options): add missing minlength and maxlength to SchemaStringOptions #8256
    • docs: add documentarraypath to API docs, including DocumentArrayPath#discriminator() #8164
    • docs(schematypes): add a section about the type property #8227
    • docs(api): fix Connection.close return param #8258 gosuhiman
    • docs: update link to broken image on home page #8253 krosenk729

    5.7.5 / 2019-10-14

    • fix(query): delete top-level _bsontype property in queries to prevent silent empty queries #8222
    • fix(update): handle subdocument pre('validate') errors in update validation #7187
    • fix(subdocument): make subdocument#isModified use parent document's isModified #8223
    • docs(index): add favicon to home page #8226
    • docs: add schema options to API docs #8012
    • docs(middleware): add note about accessing the document being updated in pre('findOneAndUpdate') #8218
    • refactor: remove redundant code in ValidationError #8244 AbdelrahmanHafez

    5.7.4 / 2019-10-09

    • fix(schema): handle required: null and required: undefined as required: false #8219
    • fix(update): support updating array embedded discriminator props if discriminator key in $elemMatch #8063
    • fix(populate): allow accessing populate virtual prop underneath array when virtual defined on top level #8198
    • fix(model): support passing options to Model.remove() #8211
    • fix(document): handle Document#set() merge option when setting underneath single nested schema #8201
    • fix: use options constructor class for all schematypes #8012

    5.7.3 / 2019-09-30

    • fix: make CoreMongooseArray#includes() handle fromIndex parameter #8203
    • fix(update): cast right hand side of $pull as a query instead of an update for document arrays #8166
    • fix(populate): handle virtual populate of an embedded discriminator nested path #8173
    • docs(validation): remove deprecated isAsync from validation docs in favor of emphasizing promises #8184
    • docs(documents): add overwriting section #8178
    • docs(promises): add note about queries being thenable #8110
    • perf: avoid update validators going into Mixed types #8192 birdofpreyru
    • refactor: remove async as a prod dependency #8073

    5.7.2 / 2019-09-23

    • fix(mongoose): support mongoose.set('autoIndex', false) #8158
    • fix(discriminator): support tiedValue parameter for embedded discriminators analagous to top-level discriminators #8164
    • fix(query): handle toConstructor() with entries-style sort syntax #8159
    • fix(populate): avoid converting mixed paths into arrays if populating an object path under Mixed #8157
    ... (truncated)
    Commits
    • 5656b4e chore: release 5.7.6
    • fab4f5d test(schema): fix tests on node v4 and v5
    • 29c5f1a fix(options): add missing minlength and maxlength to SchemaStringOptions
    • a81211d fix(populate): add document array subpaths to parent doc populated() when c...
    • 4e900eb test(populate): repro #8247
    • d69ab22 fix(document): support calling Document constructor directly in Node.js
    • 9b986f5 test(document): repro #8237
    • e5f8875 chore: add bonus.ca to opencollective sponsors
    • 25b6798 fix(populate): make ArraySubdocument#populated() return a value when the pa...
    • 8ddfc0a test(populate): repro #8247
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies security 
    opened by dependabot-preview[bot] 2
  • A way to simplify internationalization?

    A way to simplify internationalization?

    Very inspiring project. Thanks for posting it!

    I had an idea, which may make internationalization more concise:

    Right now, every place where there is internationalized text, you must include $t() around it - but this may not be necessary.

    Given that Vue is a framework that automatically re-renders in response to changes in state, what if you used an approach like in this blog posting?

    https://ourcodeworld.com/articles/read/395/getting-started-with-internationalization-i18n-in-react

    The idea is to set the language by changing the required file path for the internationalized strings, and have a state variable depend on this change, such that components automatically update.

    Its just an idea; see what you think.

    Thanks again for posting this repo!

    opened by kleydon 2
  • Bump json5 from 2.1.3 to 2.2.3

    Bump json5 from 2.1.3 to 2.2.3

    Bumps json5 from 2.1.3 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)
    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump jsonwebtoken from 8.5.1 to 9.0.0

    Bump jsonwebtoken from 8.5.1 to 9.0.0

    Bumps jsonwebtoken from 8.5.1 to 9.0.0.

    Changelog

    Sourced from jsonwebtoken's changelog.

    9.0.0 - 2022-12-21

    Breaking changes: See Migration from v8 to v9

    Breaking changes

    Security fixes

    • security: fixes Arbitrary File Write via verify function - CVE-2022-23529
    • security: fixes Insecure default algorithm in jwt.verify() could lead to signature validation bypass - CVE-2022-23540
    • security: fixes Insecure implementation of key retrieval function could lead to Forgeable Public/Private Tokens from RSA to HMAC - CVE-2022-23541
    • security: fixes Unrestricted key type could lead to legacy keys usage - CVE-2022-23539
    Commits
    • e1fa9dc Merge pull request from GHSA-8cf7-32gw-wr33
    • 5eaedbf chore(ci): remove github test actions job (#861)
    • cd4163e chore(ci): configure Github Actions jobs for Tests & Security Scanning (#856)
    • ecdf6cc fix!: Prevent accidental use of insecure key sizes & misconfiguration of secr...
    • 8345030 fix(sign&verify)!: Remove default none support from sign and verify met...
    • 7e6a86b Upload OpsLevel YAML (#849)
    • 74d5719 docs: update references vercel/ms references (#770)
    • d71e383 docs: document "invalid token" error
    • 3765003 docs: fix spelling in README.md: Peak -> Peek (#754)
    • a46097e docs: make decode impossible to discover before verify
    • Additional commits viewable in compare view
    Maintainer changes

    This version was pushed to npm by julien.wollscheid, a new releaser for jsonwebtoken since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump qs from 6.7.0 to 6.10.3

    Bump qs from 6.7.0 to 6.10.3

    Bumps qs from 6.7.0 to 6.10.3.

    Changelog

    Sourced from qs's changelog.

    6.10.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [actions] reuse common workflows
    • [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape

    6.10.2

    • [Fix] stringify: actually fix cyclic references (#426)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [actions] update codecov uploader
    • [actions] update workflows
    • [Tests] clean up stringify tests slightly
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, object-inspect, safe-publish-latest, tape

    6.10.1

    • [Fix] stringify: avoid exception on repeated object values (#402)

    6.10.0

    • [New] stringify: throw on cycles, instead of an infinite loop (#395, #394, #393)
    • [New] parse: add allowSparse option for collapsing arrays with missing indices (#312)
    • [meta] fix README.md (#399)
    • [meta] only run npm run dist in publish, not install
    • [Dev Deps] update eslint, @ljharb/eslint-config, aud, has-symbols, tape
    • [Tests] fix tests on node v0.6
    • [Tests] use ljharb/actions/node/install instead of ljharb/actions/node/run
    • [Tests] Revert "[meta] ignore eclint transitive audit warning"

    6.9.7

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] stringify: avoid encoding arrayformat comma when encodeValuesOnly = true (#424)
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] add note and links for coercing primitive values (#408)
    • [Tests] clean up stringify tests slightly
    • [meta] fix README.md (#399)
    • Revert "[meta] ignore eclint transitive audit warning"
    • [actions] backport actions from main
    • [Dev Deps] backport updates from main

    6.9.6

    • [Fix] restore dist dir; mistakenly removed in d4f6c32

    6.9.5

    • [Fix] stringify: do not encode parens for RFC1738
    • [Fix] stringify: fix arrayFormat comma with empty array/objects (#350)
    • [Refactor] format: remove util.assign call
    • [meta] add "Allow Edits" workflow; update rebase workflow
    • [actions] switch Automatic Rebase workflow to pull_request_target event

    ... (truncated)

    Commits
    • f92ddb5 v6.10.3
    • d9e9529 [Dev Deps] update eslint
    • 8b4cc14 [Fix] parse: ignore __proto__ keys
    • ad63d36 [actions] reuse common workflows
    • c028385 [Dev Deps] update eslint, @ljharb/eslint-config, object-inspect, tape
    • 0a1d3e8 [Robustness] stringify: avoid relying on a global undefined
    • 408ff95 v6.10.2
    • 3cea04d [Dev Deps] update @ljharb/eslint-config
    • 28fba8f [Dev Deps] update eslint, @ljharb/eslint-config, tape
    • 9aee773 [Fix] stringify: actually fix cyclic references
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2

    Bump decode-uri-component from 0.2.0 to 0.2.2

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump semver-regex from 3.1.3 to 3.1.4

    Bump semver-regex from 3.1.3 to 3.1.4

    Bumps semver-regex from 3.1.3 to 3.1.4.

    Release notes

    Sourced from semver-regex's releases.

    v3.1.4

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Filter on Sub Documents

    Filter on Sub Documents

    how to filter data in subdocument, I have data like

    "tournament": {
                    "_id": "61b856a44509680799f619b6",
                    "name": "Turnamen Amatir",
                    "organizer": "Club Golf Indonesia",
                    "venue": "Bukit Darmo Golf",
                    "date": "2022-02-10T08:04:42.558Z",
                    "tournamentPicture": "tournamentPicture-1640157632545.png"
                },
                "user": {
                    "_id": "5aa1c2c35ef7a4e97b5e995a",
                    "name": "Super Administrator",
                    "city": "Bucaramanga",
                    "country": "Colombia"
                },
                "pointTotal": 1
    

    I want to filter tournament name, I tried by writing param fields=tournament.name&filter=Turnamen Amatir but always fail

    opened by ssembara 0
Releases(v9.0.5)
Owner
Daniel Avellaneda
Full Stack Software Developer
Daniel Avellaneda
A reusable skeleton card component written in Vuejs

skeleton-card-vuejs A reusable skeleton card component written in Vuejs Motivation Loader spinner are boring. A skeleton card gives to the user a clue

Francesco Saverio Zuppichini 142 Nov 10, 2022
Express API to Whitelist Website

Automatize your work and use this app to reject, accept and request to your fivem server.

null 3 Nov 3, 2022
💬 Responsive Vue.js comment system plugin that built with CSS Grid and Firebase REST API + Authentication. https://tugayyaldiz.github.io/vue-comment-grid

Vue.js Comment Grid Table of Contents Introduction Installation Downloading Plugin Dependencies Include Plugin Creating Firebase Project Setting Up Si

Tugay Yaldız 155 Nov 24, 2022
Vue.js library for handling REST service requests and model definitions.

Vue service model Vue.js Library for handling REST service requests with caching, aggregation and model definitions. Features Define models and easily

null 19 Jan 15, 2022
App to fetch metadata from a dataset and complete the annotations in a basic web form

mdme [model-driven-metadata-editor] App to fetch metadata from a dataset and complete the annotations in a basic web form. The editor supports multipl

Open Source Geospatial Foundation 2 Oct 3, 2022
一款自带工作流引擎的Node.js全栈框架。A Node.js full-stack framework with workflow engine, based on koa + egg + vue + framework7

简体中文 | English CabloyJS 一款自带工作流引擎的Node.js全栈框架, 基于koa + egg + vue + framework7 目标、历史、信念 关于CabloyJS 特性 - 第一部分: 基础功能 Bean & AOP 几乎所有事物都是Bean Bean支持AOP AO

zhennann 706 Jan 4, 2023
A require hook for loading single-file vue components in node

A require hook for loading single-file vue components in node. Useful for testing without having to spin up web browsers!

Ken Powers 61 Oct 22, 2021
Webpack/Rollup/Vite plugin to add multiple root-node support to Vue 2 SFCs

vue-frag-plugin Webpack/Rollup/Vite plugin to use multiple root nodes in Vue 2 Single-file Components (SFCs). Powered by vue-frag. <template> <!--

hiroki osame 40 Nov 17, 2022
Multiplayer UNO game with Node.js and Vue

Multiplayer UNO game with Node.js and Vue Check out YouTube video Set up development environment Install docker, docker-compose, Node.js/npm Clone rep

Nuñez Manrique Cuauhtémoc Emmanuel 81 Dec 28, 2022
Melonly - a fast and modern web development framework for Node.js

Melonly is a fast and modern web development framework for Node.js. It makes it easy to create secure and fast web applications with awesome developer experience.

dominiq 3 Oct 5, 2022
Render children into a DOM node that exists outside the DOM hierarchy of the parent component

Portals provide a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.

Nourse 0 Nov 8, 2018
It's a Vue Project where I use composition API, implemented with html, css, vuejs.

?? Table of Contents About website description Project setup Compiles and hot-reloads for development Website link Contributors About It's a Vue Proje

Asmaa Adel 2 Aug 28, 2022
Search places and address using Google Maps API

Vue-Gmaps Search address and places using Google Maps API Buy me a cofffe please :) https://buymeacoff.ee/ridermansb Installation npm i -S vue-gmaps A

Riderman de Sousa Barbosa 118 Dec 31, 2022
A Vue.js autosuggest component for the Google Places API.

Vue Google Autocomplete A Vue.js (2.x) autosuggest component for the Google Maps Places API. Demo Live demo: olefirenko.github.io/vue-google-autocompl

Dmytro Olefyrenko 497 Nov 25, 2022
A Vuetify ready Vue.js autosuggest component for the Google Places API.

Vuetify Google Autocomplete A Vuetify ready Vue.js (2.x) autosuggest component for the Google Maps Places API. Versions Latest Beta: 2.0.0-beta.8 Late

Madimetja Shika 94 Dec 8, 2022
A Vue 2.x component of easy-to-config page visibility api

vue-page-visibility-awesome A Vue 2.x component of easy-to-config page visibility api Introduction Demo Install $ npm i vue-page-visibility-awesome --

Stefano 11 Jul 30, 2020
A complete course on Vue.js 3. Options/Composition API, Vuex + Vue Router.

Complete Vue.js 3 (Inc Options + Composition API, Vue Router and Vuex) Hi! Welcome to my course on Vue.js 3. Let's have a great time learning Vue.js 3

Lachlan Miller 64 Dec 25, 2022
A minimal library which polyfills the ResizeObserver API and is entirely based on the latest Draft Specification.

A minimal library which polyfills the ResizeObserver API and is entirely based on the latest Draft Specification.

Juggle 843 Jan 3, 2023