FER202Xuất hiện trong 1 đề thi
const jsonServer = require('json-server');\nconst server = jsonServer.create();\nconst router = jsonServer.router('data.json');\nconst port = 3000;\nserver.use(router);\nserver.listen(port, () => { console.log(`JSON server is running on port ${port}`); }); \nWhat is the above code used for?
Các lựa chọn
ACreate a dynamic web application using JSON data.
BCreate a dynamic server to serve JSON data.
CConfigure the development environment for the project using JSON.
DCreate a JSON file based on data from the server.