Skip to content

Instantly share code, notes, and snippets.

@dpjayasekara
Forked from deepal/bcrypt_server_sync.js
Created October 14, 2019 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpjayasekara/c73d3ed21d1502f787b3266bce82b9d3 to your computer and use it in GitHub Desktop.
Save dpjayasekara/c73d3ed21d1502f787b3266bce82b9d3 to your computer and use it in GitHub Desktop.
BCrypt server with sync bcrypt function
const express = require('express');
const encrypt = require('./encrypt');
const app = express();
app.get('/', (req, res, next) => {
const enc = encrypt(req.query.text);
res.status(200).send(enc);
});
app.listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment