To create a RESTful API for managing a simple task management system, follow these steps:

1. Install required packages
First, you need to install the necessary packages for your Node.js application. You will use Express as the web framework and MariaDB as the database.

```bash
npm init -y
npm install express mariadb body-parser dotenv
```

2. Set up environment variables
Create a `.env` file in your project root directory with the following content:

```
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=tasks_db
```

3. Create a `database.sql` file
Create a new file named `database.sql` in your project root directory with the following SQL script to create the tasks table:

```sql
CREATE DATABASE IF NOT EXISTS tasks_db;

USE tasks_db;

CREATE TABLE IF NOT EXISTS tasks (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  due_date DATE,
  status ENUM('completed', 'not_completed') DEFAULT 'not_completed'
);
```

4. Implement the RESTful API
Create a new file named `app.js` in your project root directory with the following code:

```javascript
const express = require('express');
const bodyParser = require('body-parser');
const mariadb = require('mariadb');
const dotenv = require('dotenv');

// Load environment variables from .env file
dotenv.config();

// Initialize app
const app = express();
app.use(bodyParser.json());

// Connect to MariaDB
const pool = mariadb.createPool({
  host: process.env.DB_HOST,
  user: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
});

// Helper function to execute queries
async function query(sql, params) {
  let conn;
  try {
    conn = await pool.getConnection();
    const rows = await conn.query(sql, params);
    return rows;
  } catch (err) {
    throw err;
  } finally {
    if (conn) conn.release();
  }
}

// List tasks
app.get('/tasks', async (req, res) => {
  try {
    const tasks = await query('SELECT * FROM tasks');
    res.json(tasks);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Create task
app.post('/tasks', async (req, res) => {
  const { title, description, due_date, status } = req.body;

  try {
    const result = await query(
      'INSERT INTO tasks (title, description, due_date, status) VALUES (?, ?, ?, ?)',
      [title, description, due_date, status]
    );
    res.json({ id: result.insertId });
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Update task
app.put('/tasks/:id', async (req, res) => {
  const { id } = req.params;
  const { title, description, due_date, status } = req.body;

  try {
    await query(
      'UPDATE tasks SET title=?, description=?, due_date=?, status=? WHERE id=?',
      [title, description, due_date, status, id]
    );
    res.sendStatus(200);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Delete task
app.delete('/tasks/:id', async (req, res) => {
  const { id } = req.params;

  try {
    await query('DELETE FROM tasks WHERE id=?', [id]);
    res.sendStatus(200);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

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

5. Run the application
First, create the database and table by executing the `database.sql` script:

```bash
mysql -u root -p < database.sql
```

Then, start your Node.js application:

```bash
node app.js
```

Now you have a RESTful API for managing tasks with endpoints for creating, updating, deleting, and listing tasks. The tasks are stored in a MariaDB database.
간단한 작업 관리 시스템을 관리하기 위한 RESTful API를 만들려면 다음 단계를 따르세요

1. 필요한 패키지 설치
먼저, Node.js 애플리케이션에 필요한 패키지를 설치해야 합니다. 웹 프레임워크로는 Express를, 데이터베이스로는 MariaDB를 사용할 것입니다.

```bash
npm init -y
npm install express mariadb body-parser dotenv
```

2. 환경 변수 설정
프로젝트 루트 디렉터리에 다음 내용으로 `.env` 파일을 생성합니다:

```
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=tasks_db
```

3. `database.sql` 파일 생성
다음 SQL 스크립트를 사용하여 프로젝트 루트 디렉터리에 `database.sql`이라는 새 파일을 생성하여 작업 테이블을 생성합니다:

```sql
CREATE DATABASE IF NOT EXISTS tasks_db;

USE tasks_db;

CREATE TABLE IF NOT EXISTS tasks (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  due_date DATE,
  status ENUM('completed', 'not_completed') DEFAULT 'not_completed'
);
```

4. 다음 코드를 사용하여 프로젝트 루트 디렉터리에 `app.js`라는 이름의 새 파일을 생성합니다:

```javascript
const express = require('express');
const bodyParser = require('body-parser');
const mariadb = require('mariadb');
const dotenv = require('dotenv');

// Load environment variables from .env file
dotenv.config();

// Initialize app
const app = express();
app.use(bodyParser.json());

// Connect to MariaDB
const pool = mariadb.createPool({
  host: process.env.DB_HOST,
  user: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
});

// Helper function to execute queries
async function query(sql, params) {
  let conn;
  try {
    conn = await pool.getConnection();
    const rows = await conn.query(sql, params);
    return rows;
  } catch (err) {
    throw err;
  } finally {
    if (conn) conn.release();
  }
}

// List tasks
app.get('/tasks', async (req, res) => {
  try {
    const tasks = await query('SELECT * FROM tasks');
    res.json(tasks);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Create task
app.post('/tasks', async (req, res) => {
  const { title, description, due_date, status } = req.body;

  try {
    const result = await query(
      'INSERT INTO tasks (title, description, due_date, status) VALUES (?, ?, ?, ?)',
      [title, description, due_date, status]
    );
    res.json({ id: result.insertId });
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Update task
app.put('/tasks/:id', async (req, res) => {
  const { id } = req.params;
  const { title, description, due_date, status } = req.body;

  try {
    await query(
      'UPDATE tasks SET title=?, description=?, due_date=?, status=? WHERE id=?',
      [title, description, due_date, status, id]
    );
    res.sendStatus(200);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

// Delete task
app.delete('/tasks/:id', async (req, res) => {
  const { id } = req.params;

  try {
    await query('DELETE FROM tasks WHERE id=?', [id]);
    res.sendStatus(200);
  } catch (err) {
    res.status(500).send(err.message);
  }
});

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

5. 애플리케이션 실행
먼저, `database.sql` 스크립트를 실행하여 데이터베이스와 테이블을 생성합니다:

```bash
mysql -u root -p < database.sql
```

그런 다음 Node.js 애플리케이션을 시작합니다:

```bash
node app.js
```

이제 작업을 만들고, 업데이트하고, 삭제하고, 나열하기 위한 엔드포인트를 사용하여 작업을 관리할 수 있는 RESTful API가 생겼습니다. 작업은 MariaDB 데이터베이스에 저장됩니다.