Based on node-express-server-rest-api project that was combined with Svelte.dev project created by
npx degit sveltejs/template my-svelte-project
git clone [email protected]:keenmate/node-express-svelte.git
cd node-express-svelte
npm install
npm run dev
to run development environment with hot reloadnpm start
to just serve already generated data in public folder and REST endpointscurl -X POST -H "Content-Type:application/json" http://localhost:3000/messages -d '{"text":"Hi again, World"}'
curl -X DELETE -H "Content-Type:application/json" http://localhost:3000/messages/1
{ "text": "Hi again, World" }