Categorygithub.com/emerconnelly/react-go-tutorial
modulepackage
0.0.0-20241231031327-48fd2fe3dba9
Repository: https://github.com/emerconnelly/react-go-tutorial.git
Documentation: pkg.go.dev

# README

react-go-tutorial

A simple CRUD todo list app using

  • Go for backend
  • React Typescript for frontend
  • free MongoDB Atlas cluster for database
  • Railway for deployment and hosting

Tutorial author: https://github.com/burakorkmez/react-go-tutorial

setup

  1. 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
    
    
  2. setup React

    cd ./client
    npm install
    

usage

  1. create an .env file

  2. 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 │ 
    └───────────────────────────────────────────────────┘ 
    
  3. start the React app

    cd ./client
    npm run dev
    
  4. when production is ready, build React app and push to repo

    cd ./client
    npm run build
    # push to git
    

# Structs

No description provided by the author