Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.43 KB

README.md

File metadata and controls

68 lines (43 loc) · 1.43 KB

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