levellearning/shared
This module manages code that is to be shared between the client & the server.
It provides a common way for the server and client to talk to the database and agree on types.
Includes types, interfaces, classes, helpers & scripts.
Initialization
Must be initialized before use
import { init as SharedStateInit } from "@levellearning/shared"
await SharedStateInit({
nowFn: () => timesync.now().toDate(),
app,
GetDeck: getDeck,
GetGoal: getGoal,
s3Bucket: isProd() ? "masterytrack-game-development" : "masterytrack-game-development",
GetAwsCredendtials: async () => {
return "some function that gets aws temp token"
}
})