Code Monkey home page Code Monkey logo

articles-to-feed's Introduction

Deploy article storage and feed provider on fly.io

Clone or download this repo and setup environment:

# Clone (or download)
git clone https://github.com/stefanw/articles-to-feed.git
cd articles-to-feed

# Setup Python virtualenv
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install datasette datasette-publish-fly

flyctl must be installed.

datasette publish fly \
    --app <your-app-name> \
    --create-volume 1 \
    --create-db articles \
    --install datasette-init \
    --install datasette-atom \
    --install datasette-auth-tokens \
    --install datasette-auth-passwords \
    --metadata metadata.yml \
    --plugins-dir ./plugins/ \
    --region fra

Generate password hash for user with username user:

datasette hash-password

Generate a secret bot token:

python -c 'import secrets; print(secrets.token_hex(32))'

Set secret on fly app:

flyctl --app <your-app-name> secrets set BOT_TOKEN=<bot token here> PASSWORD_HASH=<password_hash>

Go to /-/login on your instance to login.

Use the following URL to accept content via POST requests:

https://example.fly.dev/articles/add_article?_auth_token=<bot token here>

Use the following URL for your feed reader:

https://example.fly.dev/articles/feed.atom?_auth_token=<bot token here>

articles-to-feed's People

Contributors

stefanw avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.