Discover Packages
github.com/Sahil2k07/rms-go
command
module
Version:
v0.0.0-...-458f1ed
Opens a new window with list of versions in this module.
Published: Oct 29, 2024
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Go Assessment SynergyLabs
Recruitement Management System
Tech Used
Golang: Utilized Golang's standard HTTP library for routing and building a RESTful API.
Mysql: Employed MySQL as the database solution, using raw SQL queries for efficient and flexible data handling.
Validator: Integrated for robust input validation, ensuring data integrity and security.
Goose: Managed database migrations with Goose, facilitating seamless schema version control and updates.
Docker: Containerized the application with Docker, simplifying setup for the team. Testing can be done easily with docker-compose up.
Set-Up Project Locally
Docker
First clone the Project locally:
git clone https://github.com/Sahil2k07/rms-go.git
Move to the Project directory:
cd rms-go
Set these environment variables in the .env file.
API_URL=
API_KEY=
Run the command to start your Containerized Application
docker-compose up
or
docker-compose up -d
If you have Docker Compose Plugin, Use this command instead
docker compose up
or
docker compose up -d
You will be able to access this application in localhost:3000 of your machine.
Golang
Clone the repository to the local:
git clone https://github.com/Sahil2k07/rms-go.git
Move to the project directory:
cd rms-go
Set up all the required env variable by making a .env file. A .env.example file has been given for reference.
PORT=localhost:3000
JWT_SECRET=GoAppSecret
ALLOWED_ORIGINS=*
MYSQL_URL=root:<password>@tcp(127.0.0.1:3306)/<dbName>
API_KEY=
API_SECRET=
Run the command to download all the dependencies to your local machine:
go mod vendor
Now you will need to apply all the migrations in your database. First install goose locally:
go install github.com/pressly/goose/v3/cmd/goose@latest
Move to the migrations directory:
cd src/database/migrations
Run the command to apply the migrations. Make sure to modify the command to have your's used MySQL database url in the .env. Make sure to have a database created before-hand:
goose mysql "root:<password>@tcp(127.0.0.1:3306)/<dbName>" up
After applying the migrations traverse back to the root directory:
cd ../../../
Build the Binary to start the Project:
go build
Start the Project:
./rms-go
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
src
Click to show internal directories.
Click to hide internal directories.