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

github.com/dhrypt/animated-broccoli

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dhrypt/animated-broccoli

  • v0.0.0-20241020074749-471c268b6c0f
  • Source
  • Go
  • Socket score

Version published
Created
Source

Project Description: Simple Web Server in Go

This project implements a basic web server using Go's net/http package. The server serves static files from a designated directory and provides two specific endpoints: /form and /hello.

Features

  • Static File Serving: The server serves static files from the ./static directory, allowing for easy access to HTML, CSS, and JavaScript resources.
  • Form Handling: The /form endpoint processes POST requests from a form, extracting name and address values from the submitted form data.
    • Returns a confirmation message along with the submitted name and address.
  • Hello Endpoint: The /hello endpoint responds to GET requests with a simple "hello!" message. It also handles incorrect paths and methods by returning appropriate error messages.

Usage

  1. Start the server by running the Go application.
  2. Access the static files by navigating to http://localhost:8080/.
  3. To test the form handling, create a simple HTML form that submits data to http://localhost:8080/form.
  4. Access the hello endpoint by navigating to http://localhost:8080/hello.

Technologies Used

  • Go (Golang)
  • net/http package

This project serves as a foundational template for understanding HTTP request handling, form processing, and static file serving in Go.

FAQs

Package last updated on 20 Oct 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