green-lit

command module
v0.0.0-...-19c4467 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 2 Imported by: 0

README

Green-Lit API

Description

This is a RESTful API built with Go. It provides functionalities for user authentication, article management, and user management.

Getting Started

Prerequisites
  • Go version 1.x
  • PostgreSQL
Installation
  1. Clone the repository
git clone https://github.com/Dubjay18/green-lit.git
  1. Navigate to the project directory
cd green-lit
  1. Install the dependencies
go mod download
  1. Set up your environment variables in a .env file. Refer to env.copy for required variables.
Running the application
go run app.go

API Endpoints

  • GET /: Welcome endpoint
  • POST /auth-signIn: User login
  • GET /users/{id}: Get a user by ID
  • GET /articles/users/{id}: Get articles by user ID
  • GET /users: Get all users
  • GET /articles: Get all articles
  • GET /articles/{id}: Get an article by ID
  • POST /articles: Create a new article

Testing

To run the tests, use the following command:

go test ./...

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT


Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package logger provides a simple logging utility using the zap library.
Package logger provides a simple logging utility using the zap library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL