Files
linux-odyssey/server/package.json
T
wancat 3cea54ce71 feat: add new API for recording executed commands
- Add the `jsonwebtoken` dependency to the server's `package.json`
- Add a new file `commandController.js` to the server's API controllers
- Add a new route `/commands` to the server's API routes
- Add a new file `commands.js` to the server's API routes
- Modify the `index.js` file in the server's API routes to import and use the `commands.js` route
- Add a `newCommand` function to the `commandController.js` file
- Add a `Command` model to the `command.js` file in the server's models
- Add the `genSessionJWT` and `verifySessionJWT` functions to the `auth.js` file in the server's utils
- Modify the `attachContainer` function in the `docker.js` file in the server's utils to include a `token` parameter
- Modify the `swagger.yaml` file to include a new route `/commands` for recording executed commands in a session

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-24 16:39:04 +08:00

28 lines
646 B
JSON

{
"name": "server",
"version": "0.0.0",
"description": "Linux Odyssey Server",
"type": "module",
"scripts": {
"start": "node src/index.js",
"dev": "nodemon src/index.js",
"cli": "node src/client.js",
"test": "yarn node --experimental-vm-modules $(yarn bin jest)"
},
"dependencies": {
"dockerode": "^3.3.5",
"express": "^4.18.2",
"jsonwebtoken": "^9.0.1",
"marked": "^5.1.1",
"mongoose": "^7.4.0",
"socket.io": "^4.7.1",
"socket.io-client": "^4.7.1",
"swagger-ui-express": "^5.0.0",
"yaml": "^2.3.1"
},
"devDependencies": {
"jest": "^29.6.1",
"nodemon": "^3.0.1"
}
}