This is a simple To-Do list app built with Next.js and MySQL as the database.
- Add new To-Do items
- Mark To-Do items as completed
- Delete To-Do items
- Next.js: React framework for server-side rendering and building web applications.
- MySQL: Relational database for storing and retrieving To-Do items.
- Node.js: Make sure you have Node.js installed on your machine. You can download it from https://nodejs.org/.
- MySQL: Install and set up a MySQL database. Create a database and note down the connection details.
-
Clone the repository:
git clone https://github.com/PLMohamed/next-todolist.git
-
Navigate to the project directory:
cd todo-app
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory with the following content:DB_HOST=your_database_host DB_USER=your_database_user DB_PASSWORD=your_database_password DB_NAME=your_database_name
Replace
your_database_host
,your_database_user
,your_database_password
, andyour_database_name
with your actual MySQL database details. -
Run this script to set up the database tables:
npm run generate npm run migrate
-
Start the Next.js development server:
npm run dev
-
Open your browser and visit http://localhost:3000 to use the To-Do list app.
This project is licensed under the MIT License - see the LICENSE file for details.