New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/stevanmcunningham/contacts

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/stevanmcunningham/contacts

  • v0.0.0-20200316022032-016b17e4b2b9
  • Source
  • Go
  • Socket score

Version published
Created
Source

###ABOUT

CONTACTS is a simple web application that displays a contact list, with the contacts fetched from a PostgreSQL database. In order to connect to the database the sqlx and pgx packages were used. Templates were utilized to display the data on the webpage.

###HOW TO USE

##Create your database (PostgreSQL) using the contacts.sql file included in the db directory. Importing it should create the table and fake data.

Find the 'Connection String` in your database hosting software; you will need this to connect the application.

##Determine how you will run the application; do you want to pass in a -conn variable via the CLI, or will you create a .env file that the program will automatically detect and use when booting?

#CLI

In a terminal pointing to your root directory, type go run main.go -conn "connection string here"

#Using Environmental Variables

Create a .env file in your root directory. Add two variables in the file:

DATABASE_URL="your connection string here"

LISTENADDR=:"Enter an open port (default is :8080)"

In a terminal pointing to your root directory, type go run main.go

##Navigate to http://localhost:8080, or whichever port you chose to serve the application on.

Enjoy!

FAQs

Package last updated on 16 Mar 2020

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