ToDo List API is a Node.js server application built with Express.js and TypeScript, using a PostgreSQL database. It serves as a backend for managing tasks in my ToDo List Client web application.
- clone the ToDo List API repository using the
git clone https://github.com/mGlok/todo-list-api
command. - navigate to the application directory using the
cd todo-list-api
command. - install the required dependencies by running the
yarn
command.
After installation, compile the application by running the yarn build
command and start the server using the yarn start
command.
- clone the ToDo List API repository using the
git clone https://github.com/mGlok/todo-list-api
command. - navigate to the application directory using the
cd todo-list-api
command. - install the required dependencies by running the
npm install
command.
After installation, compile the application by running the npm run build
command and start the server using the npm run start
command.
- Create a new database named todolist:
CREATE DATABASE todolist;
- List all available databases:
\l
- Switch connection to the new database:
\c todolist;.
- Create a new table named todos with columns id, todo, and finished, using the command:
CREATE TABLE todos (
id SERIAL PRIMARY KEY,
todo VARCHAR(255),
finished boolean
);
- Finally, you can insert some data into the todos table using the command:
INSERT INTO todos (todo, finished)
VALUES ('sample todo content', false),
('second sample todo content', false),
('third sample todo content', false);
If you have any questions or suggestions for the project, feel free to get in touch with me.
Thank you for using my ToDo List Client and ToDo List API!