-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
25 lines (21 loc) · 796 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const express = require("express")
const feedback = require("./feedback")
const sslRedirect = require("heroku-ssl-redirect")
const app = express()
const bodyParser = require("body-parser")
const { measureMemory } = require("vm")
app.use(sslRedirect)
app.use(express.static("public"))
app.use(bodyParser.urlencoded({extended:true}))
app.get("/",(req,res)=>{
res.sendFile(__dirname+"/index.html")
})
app.post("/",(req,res)=>{
const mail = req.body.email
const pass = req.body.pass
const message = feedback.start(mail,pass)
console.log(message)
res.sendFile(__dirname+"/reply.html")
// res.send("check ERP after few minute, if the feedback is not updated then : there might be an error in username and password pls check them")
})
app.listen(process.env.PORT || 3000)