Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Commit fa3afdc

Browse files
committed
1.0.0
1 parent 9de23d0 commit fa3afdc

40 files changed

+9801
-1
lines changed

.env.sample

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Express & TypeScript Starter Kit Configuration
2+
3+
# The port on which the server will listen for incoming requests.
4+
# Default value is set to 8080.
5+
PORT=8080
6+
7+
# A comma-separated list of allowed origins for Cross-Origin Resource Sharing (CORS).
8+
# This specifies which domains are permitted to access the API.
9+
ALLOW_LIST=http://localhost:3000,http://localhost:3001
10+
11+
# The version of the API.
12+
# This should be incremented when breaking changes are made to the API.
13+
API_VERSION=1
14+
15+
# MongoDB connection string.
16+
# This specifies the URI to connect to the MongoDB server.
17+
# Ensure to include the correct database name in the connection string.
18+
MONGO_CONNECTION_URI=mongodb://localhost:27017/
19+
20+
# The name of the MongoDB database to use.
21+
# Change this to your desired database name.
22+
MONGO_DATABASE_NAME=test-db

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
services:
9+
mongodb:
10+
image: mongo:latest
11+
ports:
12+
- 27017:27017
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "22"
22+
23+
- name: Install dependencies
24+
run: npm install
25+
26+
- name: Run tests
27+
env:
28+
NODE_ENV: test
29+
PORT: 8080
30+
ALLOW_LIST: http://localhost:3000
31+
API_VERSION: 1
32+
MONGO_CONNECTION_URI: mongodb://localhost:27017/
33+
MONGO_DATABASE_NAME: test-db
34+
run: npm test
35+
36+
build:
37+
runs-on: ubuntu-latest
38+
needs: test
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
43+
- name: Set up Node.js
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: "22"
47+
48+
- name: Install dependencies
49+
run: npm install
50+
51+
- name: Build project
52+
run: npm run build

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Node Modules Directory
2+
node_modules
3+
4+
# Build
5+
dist
6+
7+
# Environment Files
8+
.env.development
9+
.env.test
10+
.env.production
11+
12+
# Mac OS
13+
.DS_STORE

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore artifacts:
2+
dist

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"useTabs": true,
5+
"printWidth": 60
6+
}

.vscode/launch.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run in Development Mode",
6+
"type": "node",
7+
"request": "launch",
8+
"runtimeExecutable": "npm",
9+
"runtimeArgs": ["run", "dev"],
10+
"console": "integratedTerminal",
11+
"internalConsoleOptions": "neverOpen",
12+
"skipFiles": [
13+
"<node_internals>/**",
14+
"${workspaceFolder}/node_modules/**"
15+
]
16+
},
17+
{
18+
"name": "Run in Production Mode",
19+
"type": "node",
20+
"request": "launch",
21+
"runtimeExecutable": "npm",
22+
"runtimeArgs": ["run", "start"],
23+
"console": "integratedTerminal",
24+
"internalConsoleOptions": "neverOpen",
25+
"skipFiles": [
26+
"<node_internals>/**",
27+
"${workspaceFolder}/node_modules/**"
28+
],
29+
"preLaunchTask": "npm: build"
30+
}
31+
]
32+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"prettier.requireConfig": true,
5+
"editor.wordWrap": "off",
6+
"editor.fontSize": 18,
7+
"editor.fontFamily": "Cascadia Code"
8+
}

.vscode/tasks.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "build",
7+
"group": "build",
8+
"problemMatcher": [],
9+
"label": "npm: build",
10+
"detail": "Build the project"
11+
}
12+
]
13+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 aquie00tt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)