please note that since the app is hosted on a free instance it takes a little while for the instance to spin up
This is a web application built using Node.js and Express, designed to help you manage your tasks efficiently.
Make sure you have Node.js and npm installed on your machine.
-
Clone the repository using following command:
git clone https://github.com/your-username/todo-app.git
-
Change into the project directory:
cd todo-app
-
Install dependencies:
npm install
-
Use npm start for starting the application on 3000 port
npm start
-
Here a few more miscellaneous scripts you can run
npm test # for running tests, this runs on the test database npm run dev # run a dev server, this runs on the development database
- User authentication using Passport.js
- Secure password storage with bcrypt
- Sequelize ORM for interacting with a PostgreSQL database
- run tests using jest
- bcrypt - Password hashing library
- cheerio - HTML parsing and manipulation
- connect-ensure-login - Ensures a user is logged in
- connect-flash - Flash messages for Express
- cookie-parser - Parse cookies in Express
- csurf - CSRF token middleware
- ejs - Embedded JavaScript templates
- express - Web application framework for Node.js
- express-session - Session middleware for Express
- passport - Authentication middleware for Node.js
- passport-local - Local authentication strategy for Passport
- pg - PostgreSQL client for Node.js
- sequelize - Promise-based ORM for Node.js
- tiny-csrf - Lightweight CSRF token middleware
To set up the database for the Todo App, you'll need to perform the following steps
- Install PostgreSQL:
- If you haven't installed PostgreSQL, download and install it from the official website.
- During installation, take note of the PostgreSQL username, password, and database name you choose.
- Configure Database Connection:
- Open the config/config.json file in your Todo App project.
- Update the development configuration with your PostgreSQL credentials:
{
"development": {
"username": "your_postgresql_username",
"password": "your_postgresql_password",
"database": "your_database_name",
"host": "127.0.0.1",
"dialect": "postgres"
}
}
# similarly enter your production and testing database details
- Run migrations
- Open a terminal in your project directory.
- Run the following commands to apply the database migrations:
npx sequelize-cli db:migrate
- Start the Application:
- After configuring the database, start your Todo App using
npm start
Remember to replace placeholders like your_postgresql_username, your_postgresql_password, and your_database_name with your actual PostgreSQL credentials. If you encounter any issues, make sure PostgreSQL is running, and your credentials are correctly configured.