This repo contains the complete code of the excalidraw-demo.
When the server is running, visiting the home page will trigger a function that will save the
details of the current drawing structure in a backend database.
These details are visible at /image
page. One can also click links for specific images.
-
Clone the repo.
-
Run
yarn setup
to setup the development server. -
Create
next.conifg.js
if not already create and exportMONGO_URI
env variable. Example:module.exports={ env: { MONGO_URI:<MongoAtlasServerConnectionURL> }, }
-
Visit
localhost:3000
and see the server running.
Your database will be populated with the different images. Each image will have this basic structure.
name: new Date().getTime().toString(),
svgString: JSON.stringify(result.outerHTML),
link: router.pathname,