Added commit # to server api.
This commit is contained in:
@@ -22,7 +22,7 @@ hooks.js:
|
||||
module.exports = [
|
||||
{
|
||||
path: "/pull",
|
||||
command: "git pull && npm i",
|
||||
command: "git pull && yarn && pm2 restart 0",
|
||||
cwd: "/home/ubuntu/io/",
|
||||
method: "post",
|
||||
},
|
||||
|
||||
@@ -34,7 +34,11 @@ app.post("/sendemail", fb.validateFirebaseIdToken, sendEmail.sendEmail);
|
||||
//Test route to ensure Express is responding.
|
||||
app.get("/test", async function (req, res) {
|
||||
console.log("Incoming request verified.", req);
|
||||
res.status(200).send("OK");
|
||||
const Commit = require("child_process").execSync(
|
||||
"git rev-parse --short HEAD"
|
||||
);
|
||||
|
||||
res.status(200).send(`OK - ${Commit}`);
|
||||
});
|
||||
const test = require("./server/_test/test.js");
|
||||
app.post("/test", test.testResponse);
|
||||
|
||||
Reference in New Issue
Block a user