New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

userjs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

userjs

user login register micro service

latest
Source
npmnpm
Version
0.8.2
Version published
Maintainers
1
Created
Source

UserJS

Clean user account API server, just install and ready to go.
Using Mongodb as database system and node.js as Backend.

FEATURES

  • Rest API
  • Security: Bcrypt as hash for password storage and json web token as authentication system.
  • Forgot and reset password function, using nodemailer to send reset email.

GET STARTED

  • Enviroment Setup

Just install Node.js and MongoDb first.

  • Installation
npm install userjs
  • Configuration

Rename config-example.js to config.js Example:

/**
 * Configuration
 */
module.exports = {
    'site': 'localhost',                            //site address for the mail system to generate reset link
    'collection': 'authentication',                 //MongoDb collection name for the data storage
    'port': '8080',                                 //site port
    'secret': '12345678',                           //secret string for jsonwebtoken generating token 
    mail: {                                         //mail configuration
        from: '"张春哲" <zhangchunzhe@scdc.sh.cn>',  //sender address  
        host: 'smtp-mail.outlook.com',              //host mail smtp address
        user: 'user@mail.com',                      //smtp server login username
        pass: '12345678'                            //smtp server login password
    }
};

API

Login

login api, send plain json email and password. return token if match.

Register

register api

Keywords

node

FAQs

Package last updated on 04 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts