2021-07-30 17:14:15 +08:00

23 lines
450 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const express = require('express')
const app = express()
const crypto = require("./crypto")
var bodyParser = require('body-parser');
app.use(bodyParser());
app.post('/crypto', function (req, res) {
let result = req.body
console.log(result)
let user = result.user
let pwd = result.password
result = crypto.Encrypt(user, pwd)
res.send(result);
})
app.listen(3000, () => {
console.log("开启服务端口3000")
})