Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/stevanmcunningham/contacts
###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
Unknown package
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.