Initial UWU
This commit is contained in:
commit
dd2cc51c40
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/node_modules
|
||||||
|
|
30
README.md
Normal file
30
README.md
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
# rfc
|
||||||
|
|
||||||
|
```text
|
||||||
|
GET /api/ws
|
||||||
|
GET /api/{uuid}/keypad/code
|
||||||
|
GET /api/{uuid}/keypad/get_user_info/{uid}
|
||||||
|
POST /api/{uuid}/keypad/log/door_open/{uid}
|
||||||
|
POST /api/{uuid}/keypad/set_code
|
||||||
|
POST /api/{uuid}/core/reboot
|
||||||
|
POST /api/{uuid}/core/update
|
||||||
|
```
|
||||||
|
|
||||||
|
## websocket
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
0, // op
|
||||||
|
{
|
||||||
|
// data,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
on connect:
|
||||||
|
- get client session code, to be used with api
|
||||||
|
- get explicitly set computer name from db, by the CC:T computer id, or randomly generated UUID thats set on SW install,
|
||||||
|
- on connect computer sends its module type eg. keypad, and gets extra info related to it, like: code, current.
|
||||||
|
|
||||||
|
|
||||||
|
|
1533
package-lock.json
generated
Normal file
1533
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
package.json
Normal file
24
package.json
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"name": "rtmc-be",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"description": "",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/express": "^4.17.21",
|
||||||
|
"@types/knex": "^0.15.2",
|
||||||
|
"@types/node": "^22.5.0",
|
||||||
|
"@types/ws": "^8.5.12",
|
||||||
|
"typescript": "^5.5.4"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.19.2",
|
||||||
|
"knex": "^3.1.0",
|
||||||
|
"pug": "^3.0.3",
|
||||||
|
"ws": "^8.18.0"
|
||||||
|
}
|
||||||
|
}
|
0
src/index.ts
Normal file
0
src/index.ts
Normal file
21
tsconfig.json
Normal file
21
tsconfig.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json.schemastore.org/tsconfig",
|
||||||
|
"compilerOptions": {
|
||||||
|
"typeRoots": ["./node_modules/@types", "./src/types"],
|
||||||
|
"strict": true,
|
||||||
|
"target": "ESNext",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"types": [""],
|
||||||
|
"noEmit": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"alwaysStrict": true,
|
||||||
|
"outDir": "build",
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src/**/*.ts",
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user