To create a Node.js web server that serves static files and provides RESTful API endpoints for CRUD operations on a "Task" model, you'll need to follow these steps:

1. Install required dependencies
2. Set up the PostgreSQL database
3. Create the Express app and set up middleware
4. Serve static files
5. Define the Task model
6. Create API routes for CRUD operations
7. Start the server

Here's an example implementation:

```javascript
// 1. Install required dependencies
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const { Pool } = require('pg');

// 2. Set up the PostgreSQL database
const pool = new Pool({
  user: 'your_user',
  host: 'localhost',
  database: 'your_database',
  password: 'your_password',
  port: 5432,
});

// 3. Create the Express app and set up middleware
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

// 4. Serve static files
app.use(express.static(path.join(__dirname, 'public')));

// 5. Define the Task model
class Task {
  constructor(id, title, description, due_date) {
    this.id = id;
    this.title = title;
    this.description = description;
    this.due_date = due_date;
  }

  static async getAll() {
    const res = await pool.query('SELECT * FROM tasks ORDER BY id ASC');
    return res.rows.map((row) => new Task(row.id, row.title, row.description, row.due_date));
  }

  static async getById(id) {
    const res = await pool.query('SELECT * FROM tasks WHERE id = $1', [id]);
    if (res.rowCount === 0) return null;
    const row = res.rows[0];
    return new Task(row.id, row.title, row.description, row.due_date);
  }

  async save() {
    if (this.id) {
      await pool.query('UPDATE tasks SET title = $1, description = $2, due_date = $3 WHERE id = $4', [
        this.title,
        this.description,
        this.due_date,
        this.id,
      ]);
    } else {
      const res = await pool.query('INSERT INTO tasks (title, description, due_date) VALUES ($1, $2, $3) RETURNING id', [
        this.title,
        this.description,
        this.due_date,
      ]);
      this.id = res.rows[0].id;
    }
  }

  async delete() {
    await pool.query('DELETE FROM tasks WHERE id = $1', [this.id]);
  }
}

// 6. Create API routes for CRUD operations
app.get('/api/tasks', async (req, res) => {
  const tasks = await Task.getAll();
  res.json(tasks);
});

app.post('/api/tasks', async (req, res) => {
  const task = new Task(null, req.body.title, req.body.description, req.body.due_date);
  await task.save();
  res.status(201).json(task);
});

app.put('/api/tasks/:id', async (req, res) => {
  const task = await Task.getById(req.params.id);
  if (!task) return res.sendStatus(404);

  task.title = req.body.title;
  task.description = req.body.description;
  task.due_date = req.body.due_date;
  await task.save();

  res.json(task);
});

app.delete('/api/tasks/:id', async (req, res) => {
  const task = await Task.getById(req.params.id);
  if (!task) return res.sendStatus(404);

  await task.delete();
  res.sendStatus(204);
});

// 7. Start the server
const port = process.env.PORT || 3000;
app.listen(port, () => {
  console.log(`Server is running on port ${port}`);
});
```

Before running this code, make sure to create a `public` directory in your project folder for serving static files.

Also, don't forget to install the required dependencies by running:

```bash
npm init -y
npm install express body-parser pg
```

And replace the PostgreSQL connection parameters with your own credentials.

Finally, you'll need to create a table called "tasks" in your PostgreSQL database with the following schema:

```sql
CREATE TABLE tasks (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  due_date DATE
);
```

Now you can run your Node.js web server using `node app.js`, and it will serve static files from the `public` directory and provide RESTful API endpoints for CRUD operations on the Task model stored in the PostgreSQL database.
정적 파일을 제공하고 "작업" 모델에서 CRUD 작업을 위한 RESTful API 엔드포인트를 제공하는 Node.js 웹 서버를 만들려면 다음 단계를 따라야 합니다.

1. 필수 종속성 설치
2. PostgreSQL 데이터베이스를 설정합니다
3. Express 앱을 생성하고 미들웨어를 설정합니다
4. 정적 파일 제공
5. 작업 모델 정의
6. CRUD 작업을 위한 API 경로 생성
7. 서버 시작

이것은 구현 예제입니다:

```javascript
// 1. Install required dependencies
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const { Pool } = require('pg');

// 2. Set up the PostgreSQL database
const pool = new Pool({
  user: 'your_user',
  host: 'localhost',
  database: 'your_database',
  password: 'your_password',
  port: 5432,
});

// 3. Create the Express app and set up middleware
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

// 4. Serve static files
app.use(express.static(path.join(__dirname, 'public')));

// 5. Define the Task model
class Task {
  constructor(id, title, description, due_date) {
    this.id = id;
    this.title = title;
    this.description = description;
    this.due_date = due_date;
  }

  static async getAll() {
    const res = await pool.query('SELECT * FROM tasks ORDER BY id ASC');
    return res.rows.map((row) => new Task(row.id, row.title, row.description, row.due_date));
  }

  static async getById(id) {
    const res = await pool.query('SELECT * FROM tasks WHERE id = $1', [id]);
    if (res.rowCount === 0) return null;
    const row = res.rows[0];
    return new Task(row.id, row.title, row.description, row.due_date);
  }

  async save() {
    if (this.id) {
      await pool.query('UPDATE tasks SET title = $1, description = $2, due_date = $3 WHERE id = $4', [
        this.title,
        this.description,
        this.due_date,
        this.id,
      ]);
    } else {
      const res = await pool.query('INSERT INTO tasks (title, description, due_date) VALUES ($1, $2, $3) RETURNING id', [
        this.title,
        this.description,
        this.due_date,
      ]);
      this.id = res.rows[0].id;
    }
  }

  async delete() {
    await pool.query('DELETE FROM tasks WHERE id = $1', [this.id]);
  }
}

// 6. Create API routes for CRUD operations
app.get('/api/tasks', async (req, res) => {
  const tasks = await Task.getAll();
  res.json(tasks);
});

app.post('/api/tasks', async (req, res) => {
  const task = new Task(null, req.body.title, req.body.description, req.body.due_date);
  await task.save();
  res.status(201).json(task);
});

app.put('/api/tasks/:id', async (req, res) => {
  const task = await Task.getById(req.params.id);
  if (!task) return res.sendStatus(404);

  task.title = req.body.title;
  task.description = req.body.description;
  task.due_date = req.body.due_date;
  await task.save();

  res.json(task);
});

app.delete('/api/tasks/:id', async (req, res) => {
  const task = await Task.getById(req.params.id);
  if (!task) return res.sendStatus(404);

  await task.delete();
  res.sendStatus(204);
});

// 7. Start the server
const port = process.env.PORT || 3000;
app.listen(port, () => {
  console.log(`Server is running on port ${port}`);
});
```

이 코드를 실행하기 전에 정적 파일을 제공하기 위해 프로젝트 폴더에 `public` 디렉터리를 만들어야 합니다.

또한 실행하여 필요한 종속성을 설치하는 것을 잊지 마세요:

```bash
npm init -y
npm install express body-parser pg
```

그리고 PostgreSQL 연결 매개 변수를 자신의 자격 증명으로 바꿉니다.

마지막으로, 다음 스키마를 사용하여 PostgreSQL 데이터베이스에 "작업"이라는 테이블을 만들어야 합니다:

```sql
CREATE TABLE tasks (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  due_date DATE
);
```

이제 `node app.js`를 사용하여 Node.js 웹 서버를 실행할 수 있으며, `public` 디렉터리에서 정적 파일을 제공하고 PostgreSQL 데이터베이스에 저장된 작업 모델에 대한 CRUD 작업을 위한 RESTful API 엔드포인트를 제공할 것입니다.