https://github.com/kaungmyathan22/golang-hotel-reservation-api
Simple golang hotel reservation api written in fiber & mongodb
https://github.com/kaungmyathan22/golang-hotel-reservation-api
fiber golang mongodb
Last synced: 3 months ago
JSON representation
Simple golang hotel reservation api written in fiber & mongodb
- Host: GitHub
- URL: https://github.com/kaungmyathan22/golang-hotel-reservation-api
- Owner: kaungmyathan22
- Created: 2023-10-20T16:27:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-23T15:42:38.000Z (over 1 year ago)
- Last Synced: 2024-12-30T00:27:33.128Z (5 months ago)
- Topics: fiber, golang, mongodb
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hotel reservation backend
# Project environment variables
```
HTTP_LISTEN_ADDRESS=:3000
JWT_SECRET=somethingsupersecretthatNOBODYKNOWS
MONGO_DB_NAME=hotel-reservation
MONGO_DB_URL=mongodb://localhost:27017
MONGO_DB_URL_TEST=mongodb://localhost:27017
```## Project outline
- users -> book room from an hotel
- admins -> going to check reservation/bookings
- Authentication and authorization -> JWT tokens
- Hotels -> CRUD API -> JSON
- Rooms -> CRUD API -> JSON
- Scripts -> database management -> seeding, migration## Resources
### Mongodb driver
Documentation
```
https://mongodb.com/docs/drivers/go/current/quick-start
```Installing mongodb client
```
go get go.mongodb.org/mongo-driver/mongo
```### gofiber
Documentation
```
https://gofiber.io
```Installing gofiber
```
go get github.com/gofiber/fiber/v2
```## Docker
### Installing mongodb as a Docker container
```
docker run --name mongodb -d mongo:latest -p 27017:27017
```