You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
432 B

import * as express from "express";
import * as schema from "@common/sprinklers/schema";
import {serialize} from "serializr";
import {state} from "../state";
import logger from "./logger";
import serveApp from "./serveApp";
const app = express();
app.use(logger);
app.get("/api/grinklers", (req, res) => {
const j = serialize(schema.sprinklersDevice, state.device);
res.send(j);
});
serveApp(app);
export default app;