Compare commits
No commits in common. "e5a06db550771bb430fb39afd2f522dccc0a417e" and "9a9bd8b71bef24ec23a2691dd4c27f4f08cf3d9d" have entirely different histories.
e5a06db550
...
9a9bd8b71b
@ -1,5 +0,0 @@
|
||||
.env
|
||||
node_modules
|
||||
dist
|
||||
dockercompose
|
||||
dockerfile
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,2 @@
|
||||
node_modules
|
||||
.env
|
||||
dockercompose.yaml
|
||||
dist
|
21
Dockerfile
21
Dockerfile
@ -1,21 +0,0 @@
|
||||
FROM node:18-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
|
||||
FROM node:18-alpine AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /app/static ./static
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE 3000
|
||||
CMD ["node", "./dist/index.js"]
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -16,8 +16,7 @@
|
||||
"devDependencies": {
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/node": "^24.0.4",
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"typescript": "^5.8.3"
|
||||
"@types/nodemailer": "^6.4.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@mongodb-js/saslprep": {
|
||||
@ -1114,20 +1113,6 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.8.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
|
||||
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "7.8.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
|
||||
|
@ -6,8 +6,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "npx tsx --watch src/index.ts",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "tsc"
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -23,7 +22,6 @@
|
||||
"devDependencies": {
|
||||
"@types/express": "^5.0.3",
|
||||
"@types/node": "^24.0.4",
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"typescript": "^5.8.3"
|
||||
"@types/nodemailer": "^6.4.17"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import nodemailer from 'nodemailer';
|
||||
import type { Transporter, SendMailOptions } from 'nodemailer';
|
||||
import { Report, Report as ReportSchema } from './models/report.js';
|
||||
import { Report, Report as ReportSchema } from './models/report';
|
||||
|
||||
export interface Fault {
|
||||
coach: string;
|
||||
@ -15,7 +15,7 @@ export interface Report {
|
||||
faults: Fault[];
|
||||
}
|
||||
|
||||
export async function handleFormData(data: any) {
|
||||
export async function handleFormData(data) {
|
||||
// Uploads form data to database and emails
|
||||
// to defined subscribers.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import express, { Request, Response } from "express";
|
||||
import { handleFormData } from "./formHandler.js";
|
||||
import { initDb } from "./database.js";
|
||||
import { handleFormData } from "./formHandler";
|
||||
import { initDb } from "./database";
|
||||
|
||||
const app = express();
|
||||
const port = process.env.port || 3000;
|
||||
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ES2020",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"removeComments": true,
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user