Skip to content

Instantly share code, notes, and snippets.

View atralice's full-sized avatar
🕶️
À la recherche du temps perdu

Antonio Tralice atralice

🕶️
À la recherche du temps perdu
View GitHub Profile
@KutsenkoA
KutsenkoA / User.js
Last active July 31, 2019 11:50
This is Sequelize user model with authorization by token. The generic salt stored with passwords.
module.exports = function(sequelize, DataTypes) {
var
User;
User = sequelize.define('User', {
name: {
type: DataTypes.STRING,
unique: false,
allowNull: true
},
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');