Git Product home page Git Product logo

todo-app's Introduction

Todo App

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.

Getting Started

Prerequisites

Make sure you have Node.js and npm installed on your machine.

Installation

  1. Clone the repository using following command:

    git clone https://github.com/your-username/todo-app.git
    
  2. Change into the project directory:

    cd todo-app
    
  3. Install dependencies:

    npm install
    
  4. Use npm start for starting the application on 3000 port

    npm start
    
  5. 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
    

Features

  • User authentication using Passport.js
  • Secure password storage with bcrypt
  • Sequelize ORM for interacting with a PostgreSQL database
  • run tests using jest

Dependencies

  • 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

Database setup

To set up the database for the Todo App, you'll need to perform the following steps

  1. 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.
  1. 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
  1. Run migrations
  • Open a terminal in your project directory.
  • Run the following commands to apply the database migrations:
npx sequelize-cli db:migrate
  1. 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.

todo-app's People

Contributors

gnaaruag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.