Hotel Bookings project built using Go and postgresql is likely a web application that allows users to search for available hotels, view room details, and make reservations. It may include features such as user authentication, and integration with third-party APIs for displaying hotel information and availability.
I used Go (golang), PostgreSQL, Bootstrap, Html, Javascript and css to build this project.
- Go
- PostgreSQL
- Bootstrap
- JAVASCRIPT
- Html
- CSS
- Chi router
- Alex edwards SCS Session Manager
- Nosurf for CSRFToken
- pgx Database Driver
- simple mail To create a simple server
- Go validator server side form validator
- To get star with this package first of all you have to clone the project ⬇️
https://github.com/raihan2bd/hotel-bookings.git
- Then Make sure you have install Go (golang) version 1.8.0 or latest stable version.
- Then make sure you have install PostgreSQL on your local mechine if you want to use this project as localy.
- To install all the Go packages navigate the folder address on your terminal and enter the below command ⬇️
go mod tidy
- After downloading the packages you should rename example.database.yml file name to database.yml file and edit database credentials to your own database information.
- To setup database tables and columns by onClick install soda cli database migration tool Then run below command ⬇️
soda migrate
Note: Before enter the below command make sure you are in the right directory.
- After finishing the avove instructions you can see the project in your local mechine by entering the below command ⬇️
./run.bat
or
go run cmd/web/main.go cmd/web/routes.go cmd/web/middleware.go cmd/web/send-mail.go
- Then you can see this project live on your browser by this link http://localhost:8080 or your given the port nuber you set for the project.
👤 Abu Raihan
- GitHub: @githubhandle
- Twitter: @twitterhandle
- LinkedIn: LinkedIn
I would like to thatnks Trevor Sawler Who help me a lot learn go with this project.
Thanks for visiting my repository. Give a ⭐️ if you like this project!
This project is MIT licensed.
Your suggestions will be more than appreciated. If you want to suggest anything for this project feel free to do that. 🙂