migration tracking.
This commit is contained in:
parent
f238b3d1ef
commit
c965bca41d
17 changed files with 86 additions and 130 deletions
|
|
@ -19,7 +19,7 @@ find . -type f -print0 | xargs -0 sed -i 's/example/mysuperplugin/g' # Change al
|
|||
Going over the example extension's structure:
|
||||
* views_api.py: This is where your public API would go. It will be exposed at "$DOMAIN/$PLUGIN/$ROUTE". For example: https://lnbits.com/mysuperplugin/api/v1/tools.
|
||||
* views.py: The `/` path will show up as your plugin's home page in lnbits' UI. Other pages you can define yourself. The `templates` folder should explain itself in relation to this.
|
||||
* migrations.py: Create database tables for your plugin. They'll be created when you run `pipenv run flask migrate`.
|
||||
* migrations.py: Create database tables for your plugin. They'll be created automatically when you start lnbits.
|
||||
|
||||
... This document is a work-in-progress. Send pull requests if you get stuck, so others don't.
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ Running the server
|
|||
LNbits uses [Flask][flask] as an application server.
|
||||
|
||||
```sh
|
||||
$ pipenv run flask migrate
|
||||
$ pipenv run flask run
|
||||
$ pipenv run python main.py
|
||||
```
|
||||
|
||||
There is an environment variable called `FLASK_ENV` that has to be set to `development`
|
||||
|
|
|
|||
|
|
@ -19,11 +19,10 @@ $ source ./.venv/bin/activate
|
|||
|
||||
You will need to set the variables in `.env.example`, and rename the file to `.env`.
|
||||
|
||||
Run the migrations and the Flask server:
|
||||
Run the server:
|
||||
|
||||
```sh
|
||||
(.venv) $ flask migrate
|
||||
(.venv) $ flask run
|
||||
(.venv) $ python main.py
|
||||
```
|
||||
|
||||
You might also need to install additional packages, depending on the [backend wallet](./wallets.md) you use.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue