By benjamint08
This is a template for a fullstack application using Go, React and Vite. This template application is a simple todo list.
- Go backend
- React frontend
- Tailwind CSS
- Vite for frontend development
- Clone the repository
- Run
npm install
- Run
go run main.go -dev
for development - Run
go run main.go -build
to build the application - Run
go run main.go
to run the application in production mode
To add an API endpoint, create a new file in the handlers
directory. Check the handlers/todo_handlers.go
file for an example.
You can then add the handler to the router in the main.go
file.
- Run
docker build -t <your_image_name> .
- Run
docker run -d -p 8080:8080 <your_image_name>
- Visit
http://localhost:8080
in your browser - Success