-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (20 loc) · 722 Bytes
/
index.js
File metadata and controls
24 lines (20 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const PORT = process.env.PORT || 5000;
const crypto = require('crypto');
const fetch = require('node-fetch');
var express = require('express')
, cors = require('cors')
, app = express();
var bodyParser = require('body-parser');
app.use(cors());
var path = require("path");
app.set('port', PORT);
app.listen(app.get('port'));
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json());
console.log("Server is running at " + PORT);
app.get('/lambdaServiceCall.html', function(request, response, next){
response.sendFile(path.join(__dirname+'/lambdaServiceCall.html'));
});
app.get('/test', function(request, response, next){
response.sendFile(path.join(__dirname+'/lambdaServiceCall.html'));
});