This starter template is an npm workspaces TypeScript monorepo that contains a Vite client app and an Express server app. The client uses Vite and Bryntum Scheduler Pro. The server uses Express and MongoDB.
Install the dependencies by running the following command:
npm installCreate a .env file and add your MongoDB Atlas cluster name and connection string:
PORT=1339
MONGODB_URI=mongodb+srv://<dbUsername>:<dbPassword>@<clusterName>.<uniqueId>.mongodb.net/?appName=devrel-tutorial-javascript-bryntum
MONGODB_DB=bryntum-schedulerpro
Run the seed script to populate your database:
npm run seedRun the local dev servers for the client and server using the following command:
npm run devThis runs the client app and server app concurrently using the npm package concurrently.
You can access the client app at http://localhost:5173 and the server app at http://localhost:1339.
To add an npm package to the correct app, use the --workspace flag with the npm install command. For example, to add the zod npm package to the server, use the following command from the root directory:
npm install zod --workspace=server