server-ws

command module
v0.0.0-...-89cf25c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: MIT Imports: 8 Imported by: 0

README ΒΆ

JustJio-Server

Server-side code for JustJio

server-landing

πŸ›  Getting Started

From your command line go to the project server directory and run the following scripts in the terminal.

1. Install dependencies

go mod tidy

2. Make a copy of .env and populate the environment variables inside

copy .env.example .env

3. Run the code

air

or if you don't have air installed

go run main.go dev

πŸ“‚ Project Folder Structure

Top Level Directory Layout
.
β”œβ”€β”€ config
β”œβ”€β”€ database
β”œβ”€β”€ handlers
β”œβ”€β”€ middleware
β”œβ”€β”€ model
β”œβ”€β”€ router
β”œβ”€β”€ main.go
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
└── README.md
API Testing Tracker
auth := v1.Group("/auth")
auth.Post("/", handlers.Login) /
auth.Post("/signup", handlers.SignUp) x
auth.Post("/verify", handlers.VerifyOTP) x

// private routes
users := v1.Group("/users")
users.Get("/:id", handlers.GetUser) /
users.Patch("/:id", handlers.UpdateUser) x
users.Delete("/:id", handlers.DeleteUser) /

rooms := v1.Group("/rooms")
rooms.Get("/", handlers.GetRooms) /
rooms.Get("/:id", handlers.GetRoom) /
rooms.Get("/invites", handlers.GetRoomInvitations) /
rooms.Get("/attendees/:id", handlers.GetRoomAttendees) /
rooms.Post("/", handlers.CreateRoom)
rooms.Post("/:id", handlers.InviteUser)
rooms.Patch("/:id", handlers.RespondToRoomInvite)
rooms.Patch("/close/:id", handlers.CloseRoom)
rooms.Patch("/leave/:id", handlers.LeaveRoom)

messages := rooms.Group("/:roomId/messages")
messages.Use(middleware.IsUserInRoom)
messages.Get("/", handlers.GetMessages)
messages.Get("/:id", handlers.GetMessage)
messages.Post("/", handlers.CreateMessage)

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis

Jump to

Keyboard shortcuts

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