# README
react-go-tutorial
A simple CRUD todo list app using
- Go for backend
- React Typescript for frontend
- ChakraUI for component library
- TanStack Query for data-fetching library
- free MongoDB Atlas cluster for database
- Railway for deployment and hosting
- uses Nixpacks for image building
Tutorial author: https://github.com/burakorkmez/react-go-tutorial
setup
-
setup Go
go install github.com/air-verse/air@latest go get github.com/gofiber/fiber/v2 go get github.com/joho/godotenv go get go.mongodb.org/mongo-driver/mongo
-
setup React
cd ./client npm install
usage
-
create an
.env
file -
start the Go app using
air
(live reload for Go apps)❯ air __ _ ___ / /\ | | | |_) /_/--\ |_| |_| \_ v1.52.3, built with Go go1.23.0 watching . !exclude tmp building... running... hello world Connected to MongoDB Atlas ┌───────────────────────────────────────────────────┐ │ Fiber v2.52.5 │ │ http://127.0.0.1:4000 │ │ (bound on host 0.0.0.0 and port 4000) │ │ │ │ Handlers ............. 5 Processes ........... 1 │ │ Prefork ....... Disabled PID ............. 44620 │ └───────────────────────────────────────────────────┘
-
start the React app
cd ./client npm run dev
-
when production is ready, build React app and push to repo
cd ./client npm run build # push to git