Coder Social home page Coder Social logo

ekazukii / simpleusermanager Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 5 KB

nodejs module for manage user

License: MIT License

JavaScript 100.00%
nodejs node-js mysql-client user-management javascript nodejs-module nodejs-mysql low-dependency mit-license mit

simpleusermanager's Introduction

SimpleUserManager

Simpleusermanager is a nodejs module for manage user with a mysql database

Geting started

simply install simpleusermanager with npm like this npm install --save simpleusermanager

Once installed you can use it by calling require(simpleusermanager)

Dependencies

This project require mysql

Example

Simple login system using express, mysql and simpleusermanager

var manager = require(simpleusermanager)
const express = require('express');
var mysql = require('mysql');

var con = mysql.createConnection({
  // Setup your mysql object
});

const app = express();
app.post('/login',function(req,res){
    var username = req.body.username, password = req.body.password
    usermanager.login(con, username, password, function(err, data) {
        if (err) throw err;
        console.log(data.id);
    });
});

simpleusermanager's People

Contributors

ekazukii avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.