To build a TypeScript application with Express and MongoDB, follow these steps:

1. Install the required dependencies

First, make sure you have Node.js installed on your machine. Then create a new directory for your project and navigate to it in your terminal.

Run the following command to initialize a new Node.js project:
```
npm init -y
```

Install the necessary packages:
```
npm install express mongoose typescript ts-node @types/node @types/express
```

2. Configure TypeScript

Create a `tsconfig.json` file in your project root directory with the following content:

```json
{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "outDir": "./dist",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src"]
}
```

3. Set up the project structure

Create a `src` folder in your project root directory. Inside the `src` folder, create the following files and folders:

- index.ts
- app.ts
- controllers/
  - userController.ts
- models/
  - userModel.ts
- routes/
  - userRoutes.ts

4. Connect to MongoDB

Inside `app.ts`, set up the connection to MongoDB using Mongoose:

```typescript
import express from 'express';
import mongoose from 'mongoose';

const app = express();
const port = process.env.PORT || 3000;

// Replace <username>, <password>, and <dbname> with your actual credentials
const mongoUri = 'mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>?retryWrites=true&w=majority';

mongoose.connect(mongoUri, { useNewUrlParser: true, useUnifiedTopology: true });

app.use(express.json());

// Import and use user routes
import userRoutes from './routes/userRoutes';
app.use('/users', userRoutes);

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});

export default app;
```

5. Create the User model

In `userModel.ts`, define a Mongoose schema for your users:

```typescript
import mongoose, { Schema, Document } from 'mongoose';

export interface IUser extends Document {
  name: string;
  email: string;
}

const UserSchema: Schema = new Schema({
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true }
});

export default mongoose.model<IUser>('User', UserSchema);
```

6. Implement the user controller

In `userController.ts`, create functions to handle CRUD operations for users:

```typescript
import { Request, Response } from 'express';
import User, { IUser } from '../models/userModel';

export const createUser = async (req: Request, res: Response) => {
  try {
    const newUser: IUser = await User.create(req.body);
    res.status(201).json(newUser);
  } catch (error) {
    res.status(400).json({ message: error.message });
  }
};

export const getUsers = async (_: Request, res: Response) => {
  try {
    const users: IUser[] = await User.find();
    res.status(200).json(users);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};

export const getUserById = async (req: Request, res: Response) => {
  try {
    const user: IUser | null = await User.findById(req.params.id);
    if (!user) return res.status(404).json({ message: 'User not found' });
    res.status(200).json(user);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};

export const updateUser = async (req: Request, res: Response) => {
  try {
    const updatedUser: IUser | null = await User.findByIdAndUpdate(req.params.id, req.body, { new: true });
    if (!updatedUser) return res.status(404).json({ message: 'User not found' });
    res.status(200).json(updatedUser);
  } catch (error) {
    res.status(400).json({ message: error.message });
  }
};

export const deleteUser = async (req: Request, res: Response) => {
  try {
    const deletedUser: IUser | null = await User.findByIdAndRemove(req.params.id);
    if (!deletedUser) return res.status(404).json({ message: 'User not found' });
    res.status(204).json(null);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};
```

7. Set up user routes

In `userRoutes.ts`, define the endpoints for your RESTful API:

```typescript
import express from 'express';
import * as userController from '../controllers/userController';

const router = express.Router();

router.post('/', userController.createUser);
router.get('/', userController.getUsers);
router.get('/:id', userController.getUserById);
router.put('/:id', userController.updateUser);
router.delete('/:id', userController.deleteUser);

export default router;
```

8. Start the server

In `index.ts`, start the server using `ts-node`:

```typescript
import app from './app';

const port = process.env.PORT || 3000;

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});
```

Add the following script to your `package.json`:

```json
"scripts": {
  "start": "ts-node src/index.ts"
}
```

Now you can start your server by running:
```
npm start
```

Your RESTful API with endpoints for creating, reading, updating, and deleting users is now up and running. You can test it using a tool like Postman or curl.
Express 및 MongoDB를 사용하여 TypeScript 애플리케이션을 빌드하려면 다음 단계를 따르세요.

1. 필수 종속성 설치

먼저, 컴퓨터에 Node.js가 설치되어 있는지 확인합니다. 그런 다음 프로젝트를 위한 새 디렉터리를 생성하고 터미널에서 해당 디렉토리로 이동합니다.

다음 명령을 실행하여 새 Node.js 프로젝트를 초기화합니다:
```
npm init -y
```

필요한 패키지를 설치합니다:
```
npm install express mongoose typescript ts-node @types/node @types/express
```

2. 타입스크립트 구성

프로젝트 루트 디렉터리에 다음 내용으로 `tsconfig.json` 파일을 생성합니다:

```json
{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "outDir": "./dist",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  },
  "include": ["src"]
}
```

3. 프로젝트 구조 설정

프로젝트 루트 디렉토리에 `src` 폴더를 생성합니다. `src` 폴더 안에 다음 파일과 폴더를 만듭니다:

- index.ts
- app.ts
- controllers/
  - userController.ts
- models/
  - userModel.ts
- routes/
  - userRoutes.ts

4. MongoDB에 연결

`app.ts` 내부에서 Mongoose를 사용하여 MongoDB에 연결을 설정합니다:

```typescript
import express from 'express';
import mongoose from 'mongoose';

const app = express();
const port = process.env.PORT || 3000;

// Replace <username>, <password>, and <dbname> with your actual credentials
const mongoUri = 'mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>?retryWrites=true&w=majority';

mongoose.connect(mongoUri, { useNewUrlParser: true, useUnifiedTopology: true });

app.use(express.json());

// Import and use user routes
import userRoutes from './routes/userRoutes';
app.use('/users', userRoutes);

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});

export default app;
```

5. 사용자 모델 생성

`userModel.ts`에서 사용자에 대한 몽구스 스키마를 정의합니다:

```typescript
import mongoose, { Schema, Document } from 'mongoose';

export interface IUser extends Document {
  name: string;
  email: string;
}

const UserSchema: Schema = new Schema({
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true }
});

export default mongoose.model<IUser>('User', UserSchema);
```

6. 사용자 컨트롤러 구현

`userController.ts`에서 사용자에 대한 CRUD 작업을 처리하는 함수를 생성합니다:

```typescript
import { Request, Response } from 'express';
import User, { IUser } from '../models/userModel';

export const createUser = async (req: Request, res: Response) => {
  try {
    const newUser: IUser = await User.create(req.body);
    res.status(201).json(newUser);
  } catch (error) {
    res.status(400).json({ message: error.message });
  }
};

export const getUsers = async (_: Request, res: Response) => {
  try {
    const users: IUser[] = await User.find();
    res.status(200).json(users);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};

export const getUserById = async (req: Request, res: Response) => {
  try {
    const user: IUser | null = await User.findById(req.params.id);
    if (!user) return res.status(404).json({ message: 'User not found' });
    res.status(200).json(user);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};

export const updateUser = async (req: Request, res: Response) => {
  try {
    const updatedUser: IUser | null = await User.findByIdAndUpdate(req.params.id, req.body, { new: true });
    if (!updatedUser) return res.status(404).json({ message: 'User not found' });
    res.status(200).json(updatedUser);
  } catch (error) {
    res.status(400).json({ message: error.message });
  }
};

export const deleteUser = async (req: Request, res: Response) => {
  try {
    const deletedUser: IUser | null = await User.findByIdAndRemove(req.params.id);
    if (!deletedUser) return res.status(404).json({ message: 'User not found' });
    res.status(204).json(null);
  } catch (error) {
    res.status(500).json({ message: error.message });
  }
};
```

7. 사용자 경로 설정

`userRoutes.ts`에서 RESTful API의 엔드포인트를 정의합니다:

```typescript
import express from 'express';
import * as userController from '../controllers/userController';

const router = express.Router();

router.post('/', userController.createUser);
router.get('/', userController.getUsers);
router.get('/:id', userController.getUserById);
router.put('/:id', userController.updateUser);
router.delete('/:id', userController.deleteUser);

export default router;
```

8. 서버 시작

`index.ts`에서 `ts-node`를 사용하여 서버를 시작합니다:

```typescript
import app from './app';

const port = process.env.PORT || 3000;

app.listen(port, () => {
  console.log(`Server running at http://localhost:${port}`);
});
```

`package.json`에 다음 스크립트를 추가합니다:

```json
"scripts": {
  "start": "ts-node src/index.ts"
}
```

이제 실행하여 서버를 시작할 수 있습니다:
```
npm start
```

이제 사용자 생성, 읽기, 업데이트 및 삭제를 위한 엔드포인트가 포함된 RESTful API가 실행 중입니다. Postman이나 curl과 같은 도구를 사용하여 테스트할 수 있습니다.