This is a simple web code editor that logs to the ProgSnapToolkit's logging server to demonstrate how it works
Setup:
- Make sure you have node instaled and a program that can host a website (e.g. the Live Server VS Code extension)
- Run
npm installfrom the project directory - Setup, configure and run your logging server using the ProgSnapToolkit
Running:
- Run
npm run dev - Host the
distfolder with a web server and navigate to it. - As you interact with the online editor, you should see events being logged to your server.
If you change your ProgSnap2 spec, for exmaple to add a new event, you need to also update the logger:
- First, with your logging server running, run
npm run gen. This will update the API endpoints and their repsective types to match your spec changes. - Optionally, regernerate the body of EventLoggerBase.ts by running
progsnap2.spec.gen.gen_client.generate_ts_methodsfrom the ProgSnapToolkit. A sample of this is intest.py. This will generate base methods for logging your new events with the correct parameters.