Skip to content

Commit 05afecf

Browse files
0 parents  commit 05afecf

7 files changed

Lines changed: 2135 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.test
78+
.env.production
79+
.env.local
80+
81+
# parcel-bundler cache (https://parceljs.org/)
82+
.cache
83+
.parcel-cache
84+
85+
# Next.js build output
86+
.next
87+
out
88+
89+
# Nuxt.js build / generate output
90+
.nuxt
91+
dist
92+
93+
# Gatsby files
94+
.cache/
95+
# Comment in the public line in if your project uses Gatsby and not Next.js
96+
# https://nextjs.org/blog/next-9-1#public-directory-support
97+
# public
98+
99+
# vuepress build output
100+
.vuepress/dist
101+
102+
# vuepress v2.x temp and cache directory
103+
.vuepress/.temp
104+
.vuepress/.cache
105+
106+
# Docusaurus cache and generated files
107+
.docusaurus
108+
109+
# Serverless directories
110+
.serverless/
111+
112+
# FuseBox cache
113+
.fusebox/
114+
115+
# DynamoDB Local files
116+
.dynamodb/
117+
118+
# TernJS port file
119+
.tern-port
120+
121+
# Stores VSCode versions used for testing VSCode extensions
122+
.vscode-test
123+
124+
# yarn v2
125+
.yarn/cache
126+
.yarn/unplugged
127+
.yarn/build-state.yml
128+
.yarn/install-state.gz
129+
.pnp.*
130+
131+
# OS generated files
132+
.DS_Store
133+
.DS_Store?
134+
._*
135+
.Spotlight-V100
136+
.Trashes
137+
ehthumbs.db
138+
Thumbs.db

‎README.md‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Express TypeScript Server 🚀
2+
3+
A robust, production-ready Node.js server setup powered by Express and TypeScript. Designed for scalability, clean architecture, and an exceptional developer experience out of the box.
4+
5+
## ✨ Key Features
6+
7+
- **Robust Foundation**: Built with Express v5 and compiled with TypeScript v6.
8+
- **Exceptional DX**: Instant hot-reloading with `nodemon` and `ts-node`.
9+
- **Clean Imports**: Fully configured absolute path aliasing via `tsconfig-paths` & `tsc-alias`.
10+
- **Production Ready**: Optimized multi-step build process separating source and distributable code.
11+
12+
## 🛠️ Prerequisites
13+
14+
Ensure you have the following installed on your system:
15+
- **Node.js** (v18.x or newer is recommended)
16+
17+
## 🚀 Getting Started
18+
19+
Follow these steps to get your development environment set up and running locally.
20+
21+
### 1. Install Dependencies
22+
23+
Install all the required packages to run the project.
24+
25+
```bash
26+
npm install
27+
```
28+
29+
### 2. Run Development Server
30+
31+
Start up the development server. This mode features hot-reloading, meaning the server will automatically restart whenever you save changes to your files.
32+
33+
```bash
34+
npm run dev
35+
```
36+
37+
### 3. Build for Production
38+
39+
Compile your TypeScript codebase down to optimized JavaScript code ready for deployment.
40+
41+
```bash
42+
npm run build
43+
```
44+
45+
The compiled output will be securely generated inside a root-level `dist/` directory.
46+
47+
### 4. Start Production Server
48+
49+
Start the compiled JavaScript application. Ensure you have compiled the code using `npm run build` beforehand!
50+
51+
```bash
52+
npm run start
53+
```
54+
55+
## 📜 Available Scripts
56+
57+
Here is a summary of the npm scripts defined within `package.json`:
58+
59+
- `npm run dev` - Initializes the development server.
60+
- `npm run build` - Initiates the TypeScript compiler & processes path aliases.
61+
- `npm run start` - Executes the compiled application from `/dist`.
62+
- `npm run test` - Placeholder command for initializing a test runner.
63+
64+
## 📁 Project Structure
65+
66+
```text
67+
├── src/ # Contains all raw TypeScript source files
68+
│ └── index.ts # Primary execution entry point
69+
├── dist/ # Production-ready compiled JavaScript
70+
├── package.json # Dependencies & executable project scripts
71+
└── tsconfig.json # TypeScript compiler options
72+
```
73+
74+
## 🥞 Tech Stack
75+
76+
- **[Express.js](https://expressjs.com/)** - Core web application framework.
77+
- **[TypeScript](https://www.typescriptlang.org/)** - Static type-checking and modern JavaScript features.
78+
- **[Nodemon](https://nodemon.io/)** - Utility monitor that automatically restarts the server.
79+
80+
---
81+
82+
*This setup is kept intentionally lean while enforcing strict, reliable types.*

0 commit comments

Comments
 (0)