Skip to content

lockval/apidemo

Repository files navigation

lockval/apidemo

This is the source code of https://apidemo.lockval.com

You can download and edit client.yaml and public/server/...

to generate your own server

Click here to open the development environment

Open in Codespaces

or run locally:

Build a vscode Dev Container environment (not recommended)

Build a Linux development environment (not recommended)

1. Server Start

in vscode TERMINAL:

./serverStart.sh

2. Build ServerScript And Upload (Choose a language you want to use)

  • JS

    edit public/server/javascript/... and run:

    npm run serverJsBuildAndUpload
  • Lua

    edit public/server/lua/... and run:

    npm run serverLuaBuildAndUpload
  • Starlark (Starlark is a dialect of Python)

    edit public/server/starlark/... and run:

    npm run serverStarBuildAndUpload
  • Go

    edit public/server/go/... and run:

    npm run serverGoBuildAndUpload

3. Build Client And Preview

in vscode TERMINAL:

WARNING, this run mode exposes the code and configuration of your service

WARNING, this run mode exposes the code and configuration of your service

WARNING, this run mode exposes the code and configuration of your service

npm run clientPublicSourceCode

Click "Open in Browser" to open website

OR

If you don't want to expose the service's code and configuration, use this command:

npm run clientPrivate

Client Code:

  • public/client/paclient.ts (core code)
  • public/client/player.ts (User Event and Module Data Definition Code, Generated by client.yaml)

Customize your own Authentication server

You can learn how to develop a login(Service AuthN) and a guest(3rd Platform AuthN) here

Define variables for your Production environment:

(If you just want to preview locally, you can ignore this configuration)

export lockvalUpdatefileDomain=127.0.0.1:8080
export lockvalUpdatefilePassword=123456
export lockvalGwAddrs=http://127.0.0.1:59501,http://127.0.0.1:59502

About

This is a website for learning and demonstrating the lockval API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published