ToDo-CRUD-application

command module
v0.0.0-...-c55f400 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 10 Imported by: 0

README

ToDo CRUD Application

This is a full-stack ToDo CRUD (Create, Read, Update, Delete) application built using Go, React, and MongoDB, with deployment on Railway.

Deployment

The application is deployed on Railway. You can access the live version here: Live Demo.

Features

  • Create a new task
  • Read or view tasks
  • Update an existing task
  • Delete a task
  • Light and Dark mode user interface
  • Real-time data fetching, caching, and updates using TanStack Query

Tech Stack

  • Go: Backend framework
  • Vite + React: Frontend
  • MongoDB: NoSQL database for storing tasks
  • Railway: Deployment platform

Prerequisites

Ensure the following are installed on your system:

  • Go
  • Node.js
  • MongoDB

Environment Variables

Create a .env file in the root of your project with the following content:

PORT=4000
ENV=development
MONGODB_URI=your-mongodb-uri

Replace your-mongodb-uri with your actual MongoDB connection string.

Installation

  1. Clone the repository:
git clone https://github.com/AdityasWorks/ToDo-CRUD-application.git
  1. Navigate to the project directory:
cd todo-crud-application
  1. Install backend dependencies:
go mod tidy
  1. Install frontend dependencies:
cd client
npm install

Running the Application

  1. Start the backend server (ensure you are in the main todo-crud-application folder):
air

This uses Air for live-reloading in Go. If you don’t have Air installed, you can install it with:

go install github.com/cosmtrek/air@latest

Alternatively, you can start the backend server without Air:

go run main.go
  1. Start the frontend server:
cd client
npm run dev
  1. Visit the application at http://localhost:PORT.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Acknowledgements

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL