Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/nhuzaa/go_timezone

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/nhuzaa/go_timezone

  • v0.0.0-20241128163349-8034fac2398b
  • Source
  • Go
  • Socket score

Version published
Created
Source

Toronto Time API

A Go-based API that provides the current time in Toronto and logs all requests to a MySQL database.

Features

  • Get current Toronto time
  • Log all time requests to MySQL database
  • Retrieve time request history
  • Docker containerization
  • Structured logging

Prerequisites

  • Docker
  • Docker Compose

Quick Start

  1. Clone the repository

  2. Run the application:

    docker-compose up --build
    

API Endpoints

  • GET /current-time: Returns the current time in Toronto
  • GET /time-logs: Returns the history of time requests

Environment Variables

The following environment variables can be configured in docker-compose.yml:

  • DB_HOST: MySQL host
  • DB_USER: Database username
  • DB_PASSWORD: Database password
  • DB_NAME: Database name

Development

To run tests:

FAQs

Package last updated on 28 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc