file name | description |
---|---|
/README.md |
|
/db.js |
Database parameter configuration module |
/index.html |
Front end page |
/package.json |
package dependency version management file |
/server.js |
Node.js service, providing API interface |
/tools.js |
Utils |
field name | type | description |
---|---|---|
id | INT | Unique identifier for the task |
title | VARCHAR | Task Title |
description | VARCHAR | Task Description |
status | INT | Task status,0:incomplete,1:complete |
update_time | VARCHAR | update_time |
1、Please ensure that Node.js and MySQL are installed in your local computer environment. If not, please install them first
2、git clone project code or downloaded locally, open it from the command console (windows: cmd, mac: Terminal), or directly using the vscode tool to open the project file directory.Execute the 'npm install' command in the current project directory command console,After the command is executed, if the 'node_modules' folder appears in the project root directory, it indicates successful execution.
3、Enter your MySQL database, create the local database 'task_demo', and create a table named 'tasks' using the following SQL:
CREATE TABLE tasks (
id int(0) NOT NULL AUTO_INCREMENT,
title varchar(255),
description varchar(500),
status int(0),
update_time varchar(500) ,
PRIMARY KEY (id)
)