forked from OfficeDev/Microsoft-Teams-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
26 lines (20 loc) · 620 Bytes
/
server.js
File metadata and controls
26 lines (20 loc) · 620 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
25
26
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
const express = require('express');
const path = require('path');
const cors = require('cors');
const app = express();
app.use(cors());
app.use(express.json());
app.use(express.urlencoded({
extended: true
}));
const ENV_FILE = path.join(__dirname, '.env');
require('dotenv').config({ path: ENV_FILE });
// Parse application/json
app.use(express.json());
// Define route for the controller.
app.use('/api/chat', require('./controller'))
app.listen(3000, function () {
console.log('app listening on port 3000!');
});