diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a434a61 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:19-alpine +ENV PORT 8080 + +WORKDIR /usr/src/app + +RUN addgroup -S appgroup && adduser -S appuser -G appgroup +USER appuser + +RUN apk add --no-cache git +COPY . . +EXPOSE 8080 +CMD ["npm", "start", "--no-update-notifier"] \ No newline at end of file diff --git a/src/config/appConfig.js b/src/config/appConfig.js index aeeccba..2d107c4 100644 --- a/src/config/appConfig.js +++ b/src/config/appConfig.js @@ -1,7 +1,7 @@ class Configuration { serverPort() { - return process.env.PORT || 8080; + return process.env.PORT || 80; } logLevel(){ return process.env.LOG_LEVEL || "info"; diff --git a/src/routes/exampleRouter.js b/src/routes/exampleRouter.js index 3243254..dd0c5c6 100644 --- a/src/routes/exampleRouter.js +++ b/src/routes/exampleRouter.js @@ -9,4 +9,7 @@ const router = express.Router(); router.route("/:id") .get(grantAccessByPermissionMiddleware([API_PERMISSIONS.PUBLIC_ENDPOINT]), exampleController.getById) +router.route("/get/:id").get(exampleController.getById) + + export default router; \ No newline at end of file