Giter Club home page Giter Club logo

nex-server's Introduction

Nex Server

The Nex Server is a simple server that serves files and directory listings over a TCP connection. It is designed to be easy to use and can be customized using a configuration file in TOML format.

Getting Started

  1. Installation

    Clone this repository to your local machine:

    git clone https://github.com/ShreyanJain9/nexserver
    cd nexserver
    cd build
    go build main.go
    sudo mv ./main /usr/local/bin/nex

    I'll add a Makefile soon.

  2. Configuration

    The Nex Server can be configured using a TOML configuration file. By default, it looks for the configuration file at /etc/nex/config.toml. You can specify a different configuration file using the -config command-line flag.

    The configuration file should contain the following parameters:

    RootDir = "/path/to/your/files"
    Port = 1900
    • RootDir: The root directory from which files will be served.
    • Port: The port number on which the server will listen for incoming connections.
  3. Running the Server

    To run the Nex Server with the default configuration file path:

    nex

    To run the server with a custom configuration file:

    nex -config /path/to/your/config.toml

The Nex Protocol

The Nex protocol is a simple text-based protocol that allows clients to request files or directory listings from the Nex Server. Read more here

  1. File Request

    To request a file, the client should send the path of the file it wants to retrieve. The server will respond with the contents of the requested file.

    client: /path/to/file.txt
    server: Contents of the file...
    
  2. Directory Listing Request

    To request a directory listing, the client should send the path of the directory it wants to list. The server will respond with a list of files and subdirectories in the requested directory.

    client: /path/to/directory/
    server: => file1.txt
    server: => subdirectory/
    

Contributing

Contributions to the Nex Server are welcome! If you encounter any issues, have suggestions for improvements, or would like to add features, feel free to open an issue or submit a pull request.

License

This project is licensed under the GNU AGPLv3. See the LICENSE file for details.

nex-server's People

Contributors

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