Skip to content

xiaobili/rayso-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Ray.so code image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published