Initial commit --

This commit is contained in:
oitsjustjose 2020-10-13 11:52:38 -05:00
commit 3cd5d356cb
88 changed files with 16758 additions and 48488 deletions

15
backend/.dockerignore Normal file
View file

@ -0,0 +1,15 @@
node_modules
npm-debug.log
.idea/
.DS_Store
.vscode
dist/
debug.log
.env
.dockerignore
.gitignore
Dockerfile

66
backend/.gitignore vendored Normal file
View file

@ -0,0 +1,66 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
**/.DS_Store
dist/
dist/**

27
backend/Dockerfile Normal file
View file

@ -0,0 +1,27 @@
FROM node:14 AS builder
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build-ts
FROM node:14-alpine AS server
WORKDIR /usr/src/app
RUN chown -R node:node /usr/src/app
USER node
EXPOSE 5001
COPY package*.json ./
RUN npm install --production
COPY --from=0 /usr/src/app/dist dist
ENV NODE_ENV=production
CMD ["node", "dist/server.js"]

1105
backend/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

39
backend/package.json Normal file
View file

@ -0,0 +1,39 @@
{
"name": "oitsjustjo.se-backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "npm run serve",
"build": "npm run build-ts",
"serve": "node dist/server.js",
"watch-node": "nodemon dist/server.js",
"watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"",
"build-ts": "tsc",
"watch-ts": "tsc -w",
"serve-debug": "nodemon --inspect dist/server.js",
"debug": "npm run build && npm run watch-debug",
"watch-debug": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run serve-debug\""
},
"dependencies": {
"@types/body-parser": "^1.19.0",
"@types/cors": "^2.8.8",
"@types/express": "^4.17.6",
"@types/mongoose": "^5.7.23",
"@types/shortid": "0.0.29",
"body-parser": "^1.19.0",
"concurrently": "^5.3.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"moment": "^2.29.1",
"mongoose": "^5.9.18",
"shortid": "^2.2.15"
},
"devDependencies": {
"typescript": "^3.9.5"
},
"keywords": [],
"author": "",
"license": "ISC"
}

0
backend/src/app.ts Normal file
View file

View file

View file

View file

0
backend/src/db.ts Normal file
View file

0
backend/src/server.ts Normal file
View file