Coder Social home page Coder Social logo

bluesky-vercel-starter's Introduction

Bluesky Vercel Starter

This is a starter project for deploying a Node.js app to Vercel using the AT Proto API package with Bluesky. It includes a basic endpoint that logs in to Bluesky and makes a post on your behalf. This could be fired from any source and should always be used server side with care to never expose your keys on the frontend client.

Prerequisites

Before you can deploy this project, you'll need to create an account on Vercel and Bluesky.

Deploying to Vercel

  1. Clone this repository:

git clone https://github.com/antpb/bluesky-vercel-starter.git

  1. Change into the project directory:

cd bluesky-vercel-starter

  1. Install the dependencies:

npm install

  1. Create a new project on Vercel by running the following command:

vercel

vercel --prod

  1. Visit your deployed app in your browser. The URL will be provided to you by Vercel after the deployment process is complete.

Using the Bluesky endpoint

This starter project includes a basic endpoint at /api/bluesky.js that logs in to Bluesky and makes a post on your behalf.

To use the endpoint, send a POST request to /api/bluesky.js with the following JSON payload:

{
"username": "your_bluesky_username",
"password": "your_bluesky_password",
"post": "your_post_text"
}

NOTE: Ensure that you are never exposing those credentials in plain text and make your server do the comms for requests through this endpoint.

The endpoint will log in to Bluesky using your username and password, and then make a post with the specified text. The response will be a JSON object containing the ID of the new post.

Note: This is just a basic example. You should modify this endpoint to suit your needs.

bluesky-vercel-starter's People

Contributors

antpb avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.