Skip to content

Latest commit

 

History

History
59 lines (52 loc) · 1.19 KB

README.md

File metadata and controls

59 lines (52 loc) · 1.19 KB

RaySO Server

Installation

npm install

Usage

npm run start

Description

This is a simple server that can be used to host a website. It is designed to be used with the RaySO website builder. The service can be deployed to a server, which uses puppeteer to download code maps. The client can obtain the stream data of the image through a simple HTTP request.

Sample Request

{
    theme: "the theme of rayso",
    background: "the background of rayso, true of false",
    darkMode: "the dark mode of rayso, true or false",
    padding: "the padding of rayso, number",
    code: "the code of rayso, base64 encoded",
}

Sample Response

{
    "the stream of the image"
}

Code Sample

const data = {
    theme: "dark",
    background: true,
    darkMode: true,
    padding: 0,
    code: "base64 encoded code",
    };
axios
    .post(url, data, {
      responseType: "stream",
      headers: {
        "Content-Type": "application/json; charset=utf-8",
      },
    })
    .then((res) => {
      return res.data; // the stream of the image
    });

Sample Image

Alt text