Coder Social home page Coder Social logo

nekoasaservice's Introduction

NekoAsAService

NaaS Neko as a Service

Unofficial initiative to deploy multiple Neko instances on different cloud providers

Api

Authentication

Bearer authentication

Authentication: Bearer TOKEN

Methods

Create room

POST /api/neko
{ 
  "name: "room-name",
  "maxMembers": 10,
  "image": "m1k1o/neko:latest",
  "password", "",
  "adminPassword": ""
}`
Parameter Description
name room name
namePattern like %%%-%%%-%%%
maxMembers 10
image m1k1o/neko:latest
password
adminPassword

Delete room

DELETE /aopi/neko/:name

Other methods

Check test/api.spec.js :)

Environment variables

Env Description Default
NAAS_API_TOKENS File path for Api tokens (see below) DONT_USE_THIS_TOKEN
NAAS_PORT TCP port where NekoAsAService will be listening 3000
NAAS_TCP_LOWERBOUND Lower bound for Neko TCP bind port 9000
NAAS_TCP_UPPERBOUND Upper bound for Neko TCP bind port 10000
NAAS_UDP_LOWERBOUND Lower bound for Neko UDP EPR port 59000
NAAS_UDP_UPPERBOUND Upper bound for Neko UDP EPR port 65000
NAAS_IMAGE Neko room image m1k1o/neko:latest

Api token files

Api uses Bearer TOKEN authentication Prtovide a JSON file with the tokens allowed and limitations

Dev api_token.file

{
  "DONT_USE_THIS_TOKEN": {
    "concurrent": 1,
    "maxUsers": 2
  },
  "NEITHER_THIS_ONE": {
    "concurrent": 2,
    "maxUsers": 4
  }
}

Development

Usage:
npm run service
npm run test

Resources

docker

Requires: docker-compose version 1.27.4, build 40524192

Build

docker-compose build

run

Change settings accordingly to your environment

NAAS_HTTP=9000 \
NAAS_HTTPS=9443 \
NAAS_CERT=~/localhost+2.pem \
NAAS_PRIVKEY=~/localhost+2-key.pem \
docker-compose up -d
Env Description Default
NAAS_HTTP Proxy HTTP port 9000
NAAS_HTTPS Proxy SSL port 9443
NAAS_CERT Path to cert.pem
NAAS_PRIVKEY Path to privkey.pem

nekoasaservice's People

Contributors

gbrian avatar

Watchers

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