UNPKG

authentic-server

Version:

This is the server component of Authentic. This provides endpoints for signup, login, confirm, and password change.

19 lines (15 loc) 275 B
const store = {} module.exports = { get, put } function get (key, cb) { const val = store[key] ? JSON.parse(store[key]) : undefined setImmediate(() => { cb(null, val) }) } function put (key, val, cb) { store[key] = JSON.stringify(val) setImmediate(cb) }