Skip to content

Commit 49b640c

Browse files
committed
feat: initialize TypeScript project with Express and Todo API
- Created package.json with dependencies for Express and TypeScript. - Set up main application file (app.ts) with basic Express server. - Implemented Todo controller with CRUD operations. - Added Todo model for managing todo items. - Created routes for Todo API. - Included basic HTML file for frontend. - Configured TypeScript with tsconfig.json for Node.js environment.
1 parent cffe22e commit 49b640c

File tree

24 files changed

+1431
-4
lines changed

24 files changed

+1431
-4
lines changed

index.js renamed to index.ts

File renamed without changes.

nodejs + typscript/package.json renamed to nodejs + typscript (with compilation)/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "learn-typescript",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "This is a simple project to learn typescript with compilation.",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.js
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) 2023 Manthan Ank
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.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Node.js TypeScript Express Starter (Without Compilation)
2+
3+
This repository provides a basic setup for a Node.js TypeScript project with Express, running directly without TypeScript compilation.
4+
5+
## Installation
6+
7+
Clone the repository or create a new directory:
8+
9+
```bash
10+
git clone <repository_url>
11+
cd project-directory
12+
```
13+
14+
## Initialize the project
15+
16+
```bash
17+
npm init -y
18+
```
19+
20+
Install necessary dependencies:
21+
22+
```bash
23+
npm install express body-parser ts-node
24+
npm install --save-dev nodemon @types/node @types/express
25+
```
26+
27+
## Usage
28+
29+
Run the project:
30+
31+
```bash
32+
npm start # or npm run start
33+
```
34+
35+
## Project Structure
36+
37+
- `src/` - Contains TypeScript source files.
38+
- `app.ts` - Main application file.
39+
- `controllers/` - Contains route controllers.
40+
- `models/` - Contains data models.
41+
- `public/` - Contains static files.
42+
- `routes/` - Contains route definitions.
43+
44+
## Configuration
45+
46+
- tsconfig.json - TypeScript configuration file.
47+
48+
## Contributing
49+
50+
Contributions are welcome! Feel free to open an issue or submit a pull request.
51+
52+
## License
53+
54+
This project is licensed under the [MIT License](/nodejs%20+%20typscript%20(without%20compilation)/LICENSE).

0 commit comments

Comments
 (0)