A simple starter project for building apps meant to be run locally. (Possibly using Hotel).
To create a new project based on this template using degit:
npx degit elucidata/local-app my-app
cd my-app
Note that you will need to have Node.js installed.
Install the dependencies...
cd my-app
npm install
...then start the server:
npm run dev
Navigate to localhost:3000. You should see your app running. Edit a component file in src/client
, save it, and reload the page to see your changes.
All json-server endpoints are mounted under /api/*
.
For example:
let events = await fetch(`/api/events?date=${date}&_sort=timestamp&_order=asc`)