Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 2.61 KB

File metadata and controls

68 lines (53 loc) · 2.61 KB

Putting Locket on the internet

This guide assumes you've never used a terminal, and you won't need one. You'll create two free accounts, click through a few screens, and end with your own copy of Locket running at a public address.

1. Create a GitHub account

GitHub is where the code lives.

  1. Go to github.com in your browser.
  2. Click Sign up (top right).
  3. Enter your email, pick a password and a username, and follow the steps until you land on your home page.

2. Put the code on GitHub

  1. On github.com, click the + button in the top right corner, then New repository.
  2. In Repository name, type locket.
  3. Leave everything else as it is and click Create repository.
  4. On the page that appears, click the link that says uploading an existing file.
  5. Open the folder with the Locket code on your computer. Select everything inside it EXCEPT the folders named node_modules and .next (if you see them), and drag it all into the GitHub page.
  6. Wait for the upload bar to finish, then click Commit changes at the bottom.

3. Create a Vercel account

Vercel is the service that turns the code into a live website. The free plan is plenty.

  1. Go to vercel.com.
  2. Click Sign Up.
  3. Choose Continue with GitHub and click Authorize Vercel when GitHub asks. That's the whole account setup.

4. Deploy

  1. On your Vercel home page, click Add New... (top right), then Project.
  2. You'll see a list of your GitHub repositories. Find locket and click Import next to it.
  3. Don't change any settings. Locket needs no environment variables and no secrets.
  4. Click Deploy.
  5. Watch the build run for a minute or two. When confetti appears, click the preview image or the Visit button.

That's it. The address looks like locket-yourname.vercel.app, and you can share it with anyone.

If something goes wrong

  • The build fails. Open the build log Vercel shows, scroll to the first red line, and check that step 2.5 uploaded every file and folder (the app, components, lib, public, and types folders, plus the loose files like package.json). Missing files are the usual cause.
  • The page loads but looks broken. Hard-refresh once (Ctrl+Shift+R, or Cmd+Shift+R on a Mac).
  • You update the code later. Upload the changed files to GitHub the same way as step 2.4; Vercel notices and redeploys by itself.

One honest note: Locket stores everything on each visitor's own device. Deploying it gives people the app, not access to anyone's vault. There is nothing on the server to leak, because there is no server code at all.