A super simple Begin create read update delete app that exemplifies a basic todo app that uses one static html page and three API endpoints that connect to a FaunaDB database.
-
You must go to https://fauna.com/ and set up a FaunaDB account and get a server secret required to run this example
-
Create an
.env
file in the root of this project and add the content below with your server secret added
@testing
FAUNADB_SERVER_SECRET=Your server secret
@staging
FAUNADB_SERVER_SECRET=Your server secret
@production
FAUNADB_SERVER_SECRET=Your server secret
-
Create a database
-
Create a collection named 'todos'
-
Create an index named 'all-todos'
Your dashboard should look like this when you finish:
Deploy your own clone of this app to Begin!
- Start the local dev server:
npm start
- Lint your code:
npm run lint
- Run your tests:
npm test
- FaunaDB - Begin x FaunaDB official documentation.
- Quickstart - basics on working locally, project structure, deploying, and accessing your Begin app
- Creating new routes - basics on expanding the capabilities of your app
Head to docs.begin.com to learn more!