mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-19 08:50:29 +00:00
add stop and system data updates from api
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user