Git Product home page Git Product logo

nexus.c's Introduction

nexus.c ๐Ÿ“ถ

Simple and tiny Web Server implemented in... Yes. You guessed it right, in C.

It provides a basic foundation for hosting web applications and serving static content. The server is designed to be easy to understand and modify. The purpose of this project was to learn something about webserver and network programming in C in one day and have fun :)

Todo

  • Make it Concurrent

Features

  • Implements a basic HTTP/1.1 server
  • Supports serving static content

Prerequisites

Before running the web server, ensure you have the following:

  • C compiler (GCC or Clang)
  • CMake
  • POSIX-compliant operating system (Linux, macOS, Unix)

Getting Started

  1. Clone the repo
git clone https://github.com/lvntky/nexus.c.git
  1. Navigate to the project directory:
cd nexus.c
  1. Compile the source code
cmake ./
  1. Run the server
./nexus
  1. By default, the server listens on localhost (port 8080). You can access it in your web browser by navigating to http://localhost:8080

Configuration

You can modify the server's behavior by adjusting the values in the config.h file. Here are some options you might want to customize:

  • PORT: The port number the server listens on (default: 8080).
  • THREAD_POOL_SIZE: The maximum number of threads that handle incoming requests
  • WEB_ROOT: The directory where the server looks for static files (default: "./public").

Contributing

Contributions are welcome! If you find any bugs or have suggestions for improvements, please open an issue or submit a pull request. Make sure to follow the existing coding style and provide appropriate test coverage.

License

This project is licensed under the MIT License.

Referances/Documents

nexus.c's People

Contributors

lvntky avatar

Stargazers

 avatar  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.