A shared todo app to show how to build web applications against the Sync Gateway REST API.
The app is a simple shared to-do list manager. Users can create multiple lists, each with its own items that can be checked off when done. Lists are private by default but can be shared with other users.
The app is also available on other platforms: ToDoLite-iOS, ToDoLite-Android.
- Clone the repository
- Run
npm install
to install the dependencies - Run
gulp
to build the app - Start Sync Gateway locally with the configuration file in the root of this repo.
Opening
http://localhost:4984/todos/
in your browser should show information about the thetodos
database.
For most endpoints, the web app will send requests with credentials to Sync Gateway directly. The config file uses CORS config to make cross origin requests.
For signing up a new user, you can use the demo app server in main.go
.
- Start the web server:
$ go run main.go
- Create a new user through the web app:
http://localhost:3000/signup
The app server will attempt to connect to the Sync Gateway admin REST API on http://localhost:4985
.
3. Login with the credentials of the created user on:
http://localhost:3000/login