Coder Social home page Coder Social logo

simple-http-server-go's Introduction

Simple HTTP Server in Golang

Static Badge

Table of Contents

  1. About the Project
  2. Getting Started
  3. Author

About the Project

This project is a simple HTTP server written in Go. It listens for incoming connections and handles them concurrently. The server supports three commands: echo, user-agent, and files.

  • The echo command echoes back the path after the /echo/ in the response body.
  • The user-agent command returns the User-Agent from the request headers.
  • The files command supports both GET and POST methods. The GET method reads a file from the server's directory and returns its content. The POST method receives a file from the client and saves it to the server's directory.

The server is designed to be simple and easy to understand, making it a great starting point for anyone interested in learning about network programming in Go.

Getting Started

To get a local copy up and running, follow these simple steps:

Prerequisites

  • Go: You need to have Go installed on your machine to run this server. You can download it from the official website: https://golang.org/dl/

To run the server, navigate to the directory containing the server.go file in your terminal and run the command go run server.go.

Alternatively, you can execute the your_server.sh shell script.

Author

Timothy Hwang

simple-http-server-go's People

Contributors

timhwang777 avatar codecrafters-bot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.