Skip to content

maia2a/server-in-orbit

Repository files navigation

Server in Orbit

Welcome to Server in Orbit, a project designed to simulate a space-bound server environment, exploring innovative ways to handle computation and data transmission between Earth and satellites.

Features

  • High Performance: Optimized for efficient data handling and low latency communication.
  • Simulation: Model realistic server conditions in space.
  • Scalable: Easily adaptable to different computational loads.

Technologies Used

  • Node.js: Back-end server handling.
  • Express: Lightweight and fast framework for managing API requests.
  • WebSocket: Real-time, bidirectional communication for efficient data transfer.
  • Docker: Containerized environment for easy deployment and scaling.

Getting Started

Follow these steps to get the server running on your local machine or in a containerized environment.

Prerequisites

Ensure you have the following installed:

Installation

  1. Clone the repository:

    ```bash git clone https://github.com/maia2a/server-in-orbit.git ```

  2. Navigate into the project directory:

    ```bash cd server-in-orbit ```

  3. Install dependencies:

    ```bash npm install ```

Running the Server

Locally

To run the server locally:

```bash npm start ```

Docker

To run the server in a Docker container:

  1. Build the Docker image:

    ```bash docker build -t server-in-orbit . ```

  2. Run the Docker container:

    ```bash docker run -p 3000:3000 server-in-orbit ```

Configuration

Customize the server behavior through environment variables:

  • PORT: Define the port for the server (default: 3000).
  • SATELLITE_LATENCY: Simulate satellite latency in milliseconds (default: 500).

Example:

```bash PORT=8080 SATELLITE_LATENCY=700 npm start ```

WebSocket Communication

The server uses WebSockets for real-time communication. To test the WebSocket:

  1. Connect to the WebSocket endpoint:

    ```ws://localhost:3000```

  2. Send and receive messages in real-time.

API Endpoints

  • GET /status: Check server health.
  • POST /data: Send data to the server.

Testing

Run unit tests using:

```bash npm test ```

Contributing

Feel free to submit pull requests or issues to improve the project. All contributions are welcome! """

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published