Coder Social home page Coder Social logo

elementsproject / filebazaar Goto Github PK

View Code? Open in Web Editor NEW
120.0 13.0 27.0 183 KB

Sell digital files with Bitcoin & Lightning :zap:

Home Page: https://blockstream.com/2018/03/22/filebazaar-joins-the-lightning-charge-lapps.html

License: MIT License

JavaScript 72.94% Shell 0.28% CSS 3.47% HTML 23.31%
bitcoin lightning lightning-charge micropayments nanopayments

filebazaar's People

Contributors

shesek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filebazaar's Issues

Error base64 buffer

When I start filebazaar for the first time after modifying .yaml file I have this error:

`# filebazaar ForSale/_filebazaar.yaml
/usr/local/lib/node_modules/filebazaar/dist/lib/util.js:58
var pngPixel = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=', 'base64');
^

TypeError: base64 is not a function
at Function.from (native)
at Function.from (native)
at Object. (/usr/local/lib/node_modules/filebazaar/dist/lib/util.js:58:23)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/local/lib/node_modules/filebazaar/dist/app.js:15:13)`

What can I do?

Error when requesting invoice

Hello,

I am getting the following error when clicking to pay for the image and requesting an invoice. I had everything working but now this happens.

POST /_invoice 500 47.941 ms - 148
Error: write EPROTO 139995458078528:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

at _errnoException (util.js:1003:13)
at WriteWrap.afterWrite [as oncomplete] (net.js:863:14)

GET /IMG_4349.jpg?preview 200 5.690 ms - 5214134

Allow setting BTC display unit

Currently, BTC amounts are always displayed as millibits. Would be nice to support satoshis, bits and whole bitcoins as well.

Add lightning-network as a topic to this repository

Hello,

This repository is listed on the Awesome Lightning-Network list, which is a collection of useful lightning-network projects. However, it seems that the 'lightning-network' topic is missing from this repository's topics.

Adding the 'lightning-network' topic will help users discover your project more easily and recognize its relevance to the lightning-network ecosystem. To add the topic, please follow these steps:

  1. Navigate to the main page of the repository.
  2. Click on the gear icon next to "About" on the right side of the page.
  3. In the "Topics" section, type 'lightning-network' and press Enter.
  4. Click "Save changes."

Thank you for your attention and for contributing to the lightning-network community!

Setup questions

I've got filebazaar installed and running, like so:

$ filebazaar
FileBazaar serving /home/bitcoin/ForSale on port 9678, browse at http://0.0.0.0:9678/

...but when I visit it in my browser, I get a text-only display (rather than a pretty interface as in the readme), and the links don't work. I suppose I have something misconfigured?

_filebazaar.yaml looks like:

---

### Server settings

env: production

#port: 9678
host: 0.0.0.0
#url: http://my-url.com

### Lightning Charge

charge_url: http://localhost:9112
charge_token: SECRET

### FileBazaar settings

# The directory containing the files for sale
# defaults to the directory containing this file
# directory: /path/to/files

# The default file price, can be overridden for individual files (see below)
#default_price: 0.25 USD

# Expiry times
#invoice_ttl: 3600 # lock-in exchange rate for 1 hour
#download_ttl: 172800 # make download available for 2 days after payment

# Secret for generating HMAC access tokens (required)
token_secret: SECRET

# Directory to keep cached preview files
# defaults to `{directory}/_filebazaar_cache`
#cache_path: /path/to/filebazaar_cache

### Looks & feel

# See available themes on https://bootswatch.com
#theme: yeti

# Add custom CSS
#css: |
#  body { background: blue }
#  a { color: orange }

# Set custom views directory
#views_dir: /path/to/custom/views

# Set custom static files directory
#static_dir: /path/to/custom/static

### Files settings

files:
  Books/:
    Mastering-Bitcoin.pdf:
      price: 5 USD
      button: Buy this book

Thanks for your help :)

NaN token, no download possible.

Everything works fine but when I pay the invoice, the page redirects to the preview page. The token variable in the URL contains "NaN":
GET /_invoice/JNW52x79Wir5KIuZPE4qJ/longpoll.png 200 11409.545 ms - 68 GET /duck.jpg?invoice=JNW52x79Wir5KIuZPE4qJ 302 5.038 ms - 212 GET /duck.jpg?token=JNW52x79Wir5KIuZPE4qJ.NaN.svWchyqGCyv5PnMZXwJ0mDUF9JRKwswsHdCxcJlkcP8 200 149.135 ms - 1937 GET /_themes/yeti/bootstrap.min.css 304 0.607 ms - - GET /_assets/style.css 304 0.390 ms - - GET /duck.jpg?preview 304 1.009 ms - -

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.