This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5ade619
Showing
44 changed files
with
15,432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
> 1% | ||
last 2 versions | ||
not ie <= 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.git | ||
.vscode | ||
dist | ||
node_modules | ||
.dockerignore | ||
.gitignore | ||
Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[*.{js,jsx,ts,tsx,vue}] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = crlf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
.env | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM node:12-buster | ||
|
||
RUN mkdir -p /home/node/risk-assignment-site/node_modules && mkdir -p /home/node/risk-assignment-siten/dist && chown -R node:node /home/node/risk-assignment-site | ||
|
||
WORKDIR /home/node/risk-assignment-site | ||
|
||
COPY package*.json ./ | ||
|
||
RUN npm install pm2 -g | ||
RUN npm install | ||
|
||
COPY . . | ||
COPY --chown=node:node . . | ||
|
||
RUN npm run build | ||
|
||
RUN chmod -R 777 ./dist | ||
|
||
USER node | ||
|
||
COPY setup.sh /usr/local/bin/ | ||
|
||
ENTRYPOINT [ "setup.sh" ] | ||
|
||
EXPOSE 8080 | ||
|
||
CMD [ "pm2-runtime", "index.js" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# risk-admin | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
|
||
### Build front-end | ||
``` | ||
npm run build | ||
``` | ||
|
||
### Run site | ||
``` | ||
node index.js | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@vue/app', | ||
{ | ||
useBuiltIns: 'entry' | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const bluebird = require('bluebird'); | ||
const dotenv = require('dotenv'); | ||
const express = require('express'); | ||
const http = require('http'); | ||
const passport = require('passport'); | ||
const pgp = require('pg-promise'); | ||
const socket = require('socket.io'); | ||
|
||
const dbConfig = require('./server/database'); | ||
const expressConfig = require('./server/express'); | ||
const passportConfig = require('./server/passport'); | ||
|
||
(async () => { | ||
dotenv.config(); | ||
|
||
const serverPort = process.env.SERVER_PORT; | ||
|
||
const db = dbConfig(bluebird, pgp); | ||
passportConfig(passport, db); | ||
|
||
const app = express(); | ||
const httpApp = http.Server(app); | ||
|
||
httpApp.listen(serverPort, console.log(`Server running on port ${serverPort}`)); | ||
|
||
const io = socket(httpApp); | ||
|
||
await expressConfig(express, app, db, io, passport); | ||
})().catch(console.error); |
Oops, something went wrong.