Y-Sweet Quickstart
Clone the example app
# Clone the repo
git clone git@github.com:jamsocket/y-sweet.git
# Enter the nextjs directory
cd y-sweet/examples/nextjs
# Install dependencies
npm install
Get a connection string
Create a Y-Sweet service in the Jamsocket dashboard. On your new service’s page, click “New connection string”. Give it a description and click “Create”, and copy the connection string. This is a secret key that your app will use to create docs and generate client tokens which give clients the ability to read and write y-sweet documents.
Run the app
Set CONNECTION_STRING
as an environment variable.
# Use the connection string you copied from the Jamsocket dashboard
export CONNECTION_STRING="MY_CONNECTION_STRING"
Run the app
npm run dev
This will print out a URL, usually http://localhost:3000, which you can open in your browser:
Next steps
- Build a To-Do List from scratch.
- Build a Color Grid from scratch.