-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
28 lines (23 loc) · 858 Bytes
/
app.js
File metadata and controls
28 lines (23 loc) · 858 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
27
28
require("dotenv").config();
const express = require("express");
const app = express();
const userSettingRouter = require("./api/userSettings/userSetting.router");
const port = 3000 || process.env.APP_PORT;
app.use(express.json());
app.use("/api/userSettings", userSettingRouter);
app.get('/api/userSettings/ping', (req, res, next) => {
response = {
data: "Settings microservice works!"
}
res.json(response);
});
app.listen(port, function () {
console.log("Server running...");
});
/*
If Authentication protocol not supported by Client error appears,
type the following command into your mysql workspace
[ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';]
followed by [flush privileges;]
also make sure your db configuration is identical to what's found in the environment variables
*/