Skip to content

ritikk112/Go_CRUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a demonstration of CRUD (Create, Read, Update, Delete) operations implemented in Go using the GoFr framework. It provides a simple API for managing employee records.

Getting Started:-

Follow these steps to get the project up and running:

1. Installation

Clone the repository:

Install project dependencies:

    go mod tidy

2. Configuration

The project may require configuration depending on your environment, such as database settings or port numbers. You can find the configuration options in the config directory.

3. Running the Application

To start the application, run the following command from the project's root directory:

    go run main.go

The application will start, and you will see output indicating the server is running on a specific port.

API Endpoints

The following API endpoints are available:-
  • POST /api/employees: Create a new employee record.
  • GET /api/employees/{id} Retrieve an employee record by ID.
  • PUT /api/employees/{id} Update an existing employee record by ID.
  • DELETE /api/employees/{id} Delete an employee record by ID.

  • You can use Postman to test various API Calls

    4.Testing

    To run unit tests for the project, use the following command:

      cd handler

      go test -cover

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages