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

github.com/rawsashimi1604/go-stock-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/rawsashimi1604/go-stock-api

  • v0.0.0-20230810123640-d0a09e33a5a9
  • Source
  • Go
  • Socket score

Version published
Created
Source

go-stock-api

Connection String

Please use this connection string in your .env file.

POSTGRES_URL="postgres://postgres:mysecretpassword@127.0.0.1:5432/stocksdb?sslmode=disable"

Start a docker container and create the stocks database.

docker pull postgres:latest
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
docker exec -it some-postgres bash
su postgres
psql
CREATE DATABASE stocksdb;

Create Stock table.

CREATE TABLE stock (
    id SERIAL PRIMARY KEY,
    name TEXT,
    price NUMERIC,
    company TEXT
);

Running with hot reload using Air

  1. Install air https://github.com/cosmtrek/air
  2. Run using cmd air
  3. Make sure air is in PATH

FAQs

Package last updated on 10 Aug 2023

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