Skip to content
Snippets Groups Projects
Commit 0bb35bf2 authored by Abdulsamad Sheikh's avatar Abdulsamad Sheikh :cat2:
Browse files

Updated README.md

parent dd235b83
Branches
No related tags found
No related merge requests found
Pipeline #25517 failed
......@@ -20,5 +20,44 @@ This repository contains the source code for a RESTful web service written in Go
Clone the repository to your local machine:
```sh
git clone https://github.com/your-username/library-stats-service.git
cd library-stats-service
git clone https://git.gvk.idi.ntnu.no/ab/assignment1.git
cd assignment1
```
### Running the Service
To run the service locally, navigate to the project directory and execute:
```sh
go run main.go
```
This will start the server on `localhost:8080`. Ensure there are no errors in the terminal indicating the server has started successfully.
### Testing the Endpoints
You can test the endpoints using `curl` or Postman. Here are examples using `curl`:
- **Get Book Count**:
```sh
curl "http://127.0.0.1:8080/librarystats/v1/bookcount/?language=en"
```
- **Get Readership**:
```sh
curl "http://127.0.0.1:8080/librarystats/v1/readership/en"
```
- **Service Status**:
```sh
curl "http://127.0.0.1:8080/librarystats/v1/status/"
```
Replace `en` with the desired ISO 639-1 language code as needed.
### Deployment
The final web service should be deployed on Render. Follow the instructions provided in the course material or Render's documentation to deploy your Go application. Ensure to set the correct environment variables and configurations as required by your application and external services it depends on.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment