add stop and system data updates from api

This commit is contained in:
2024-12-21 18:23:08 -08:00
parent 1dab9e4167
commit e4d7e9bd74
2 changed files with 100 additions and 1 deletions

View File

@@ -5,11 +5,12 @@ import { resolvers } from "./resolvers";
import { sharedMemory } from "./sharedMemory";
import { loadTestData } from "./testData";
import { ServerContext } from "./serverContext";
import { startDataUpdater } from "./sharedMemoryUpdater";
const typeDefs = readFileSync("./schema.graphql", "utf8");
async function main() {
loadTestData(sharedMemory);
// loadTestData(sharedMemory);
const server = new ApolloServer<ServerContext>({
typeDefs,
@@ -27,6 +28,8 @@ async function main() {
},
});
startDataUpdater();
console.log(`Server ready at: ${url}`);
}