feat: load in configs

This commit is contained in:
Naomi Carrigan 2025-02-16 15:54:42 -08:00
parent b43bfd612b
commit 107f54d269
Signed by: naomi
SSH Key Fingerprint: SHA256:rca1iUI2OhAM6n4FIUaFcZcicmri0jgocqKiTTAfrt8
9 changed files with 4074 additions and 0 deletions

38
.gitea/workflows/ci.yml Normal file
View File

@ -0,0 +1,38 @@
name: Node.js CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint and Test
steps:
- name: Checkout Source Files
uses: actions/checkout@v4
- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Dependencies
run: pnpm install
- name: Lint Source Files
run: pnpm run lint
- name: Verify Build
run: pnpm run build
- name: Run Tests
run: pnpm run test:ci

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
node_modules
prod

10
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["typescript"],
"sonarlint.connectedMode.project": {
"connectionId": "nhcarrigan",
"projectKey": "nhcarrigan_forms-api"
}
}

5
eslint.config.js Normal file
View File

@ -0,0 +1,5 @@
import NaomisConfig from "@nhcarrigan/eslint-config";
export default [
...NaomisConfig
]

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "forms-api",
"version": "0.0.0",
"description": "The API for all of our web forms.",
"main": "index.js",
"scripts": {
"build": "tsc",
"lint": "eslint src --max-warnings 0",
"start": "op run --env-file=prod.env --no-masking -- node prod/index.js",
"test": "echo \"Error: no test specified\" && exit 0"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0",
"@types/node": "22.13.4",
"eslint": "9.20.1",
"typescript": "5.7.3"
}
}

3991
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

2
prod.env Normal file
View File

@ -0,0 +1,2 @@
MONGO_URI="op://Environment Variables - Naomi/Forms API/mongo_uri"
EMAIL_PASS="op://Environment Variables - Naomi/Forms API/email_password"

1
src/index.ts Normal file
View File

@ -0,0 +1 @@
console.log("Hi");

3
tsconfig.json Normal file
View File

@ -0,0 +1,3 @@
{
"extends": "@nhcarrigan/typescript-config"
}