Speech as a package #416
4 changed files with 29 additions and 28 deletions
47
README.md
47
README.md
|
@ -1,25 +1,20 @@
|
||||||
ORM ORM
|
|||||||
# Spee.ch
|
# Spee.ch
|
||||||
|
|
||||||
spee.ch is a node-based web server that uses a lbrynet daemon to interact with the lbry network.
|
This repo packages the spee.ch server for use with spee.ch implementations.
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
visit [lbryio/www.spee.ch](https://github.com/lbryio/www.spee.ch) to get started
|
||||||
ORM ORM
|
|||||||
|
|
||||||
* start spee.ch
|
## Development / Structure
|
||||||
ORM ORM
ORM ORM
|
|||||||
* clone this repo
|
* the `server/` folder contains all of the server code
|
||||||
ORM ORM
ORM ORM
|
|||||||
* run `npm install`
|
* `index.js` is the entry point for the server. It creates the [express app](https://expressjs.com/), requires the routes, syncs the database, and starts the server listening on the `PORT` designated in the config file. This file is the entry point for webpack to build the server bundle.
|
||||||
ORM ORM
ORM ORM
|
|||||||
* create your `
|
* the `server/routes` folder contains all of the routes for the express app
|
||||||
ORM ORM
ORM ORM
|
|||||||
speechConfig.js` file
|
* the `server/models` folder contains all of the models which the app uses to interact with the `mysql` database. Note: this app uses the [sequelize](http://docs.sequelizejs.com/) orm.
|
||||||
ORM ORM
ORM ORM
|
|||||||
* copy `speechConfig.js.example` and name it `speechConfig.js`
|
* webpack
|
||||||
ORM ORM
ORM ORM
|
|||||||
* replace the `null` values in the config file with the appropriate values for your environment
|
* During the build process, webpack creates a bundle for this project at `index.js`:
|
||||||
ORM ORM
ORM ORM
|
|||||||
* build the app by running `npm run build-prod`
|
|
||||||
ORM ORM
|
|||||||
* to start the server, run `npm run start`
|
|
||||||
ORM ORM
|
|||||||
* visit [localhost:3000](http://localhost:3000)
|
|
||||||
ORM ORM
|
|||||||
* start spee.ch-sync (optional, recommended)
|
|
||||||
ORM ORM
|
|||||||
* Note: this tool will decode blocks from the `lbry` blockchain and update the Claim and Certificate tables in mysql with all the claims from the blockchain. This is not necessary if you only want to host and resolve content published through your version of spee.ch, but it is required if you want to retrieve and host other content from the lbry network.
|
|
||||||
ORM ORM
|
|||||||
* install and run this [`speech-sync`](https://github.com/billbitt/spee.ch-sync) tool
|
|
||||||
ORM ORM
|
|||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
* Spee.ch uses `mocha` with `chai` for testing.
|
* This package uses `mocha` with `chai` for testing.
|
||||||
ORM ORM
ORM ORM
|
|||||||
* To run all tests that do not require LBC, run `npm test -- --grep @usesLbc --invert`
|
* To run all tests that do not require LBC, run `npm test -- --grep @usesLbc --invert`
|
||||||
* To run all tests, including those that require LBC (like publishing), simply run `npm test`
|
* To run all tests, including those that require LBC (like publishing), simply run `npm test`
|
||||||
|
|
||||||
|
@ -41,8 +36,8 @@ spee.ch is a node-based web server that uses a lbrynet daemon to interact with t
|
||||||
ORM ORM
ORM ORM
|
|||||||
* /api/claim/publish
|
* /api/claim/publish
|
||||||
* example: `curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish`
|
* example: `curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish`
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* `name`
|
* `name` (required)
|
||||||
ORM ORM
ORM ORM
|
|||||||
* `file` (must be type .mp4, .jpeg, .jpg, .gif, or .png)
|
* `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png)
|
||||||
ORM ORM
ORM ORM
|
|||||||
* `nsfw` (optional)
|
* `nsfw` (optional)
|
||||||
* `license` (optional)
|
* `license` (optional)
|
||||||
* `title` (optional)
|
* `title` (optional)
|
||||||
|
@ -56,16 +51,20 @@ If you find a bug or experience a problem, please report your issue here on gith
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
|
||||||
## Contribute
|
## Contribute
|
||||||
|
|
||||||
### below is a guide to the issue tags in this repo
|
### Below is a guide to the issue tags in this repo
|
||||||
ORM ORM
ORM ORM
|
|||||||
level 1 - issues with spee.ch that anyone with basic web development can handle, little-to-no experience with the spee.ch codebase is required.
|
####level 1
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
Issues with spee.ch that anyone with basic web development can handle, little-to-no experience with the spee.ch codebase is required.
|
||||||
ORM ORM
|
|||||||
|
|
||||||
level 2 - issues with spee.ch familiarity with the spee.ch codebase is required, but little-to-no familiarity with the lbry daemon is necessary
|
#### level 2
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
Issues with spee.ch familiarity with the spee.ch codebase is required, but little-to-no familiarity with the lbry daemon is necessary
|
||||||
ORM ORM
|
|||||||
|
|
||||||
level 3 - issues with spee.ch strong familiarity with the spee.ch code base and how the lbry daemon functions is required
|
#### level 3
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
Issues with spee.ch strong familiarity with the spee.ch code base and how the lbry daemon functions is required
|
||||||
ORM ORM
|
|||||||
|
|
||||||
level 4 - issues with lbry (e.g. the spee.ch wallet, lbrynet configuration, etc.) that require strong familiarity with the lbry daemon and/or network to fix. Generally these issues are best suited for the lbry protocol team but are placed in this repo because of they are part of the spee.ch implementation
|
#### level 4
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
Issues with lbry (e.g. the spee.ch wallet, lbrynet configuration, etc.) that require strong familiarity with the lbry daemon and/or network to fix. Generally these issues are best suited for the lbry protocol team but are placed in this repo because of they are part of the spee.ch implementation
|
||||||
ORM ORM
|
|||||||
|
|
||||||
|
### Stack
|
||||||
ORM ORM
|
|||||||
The spee.ch stack is MySQL, Express.js, Node.js, React.js. Spee.ch runs lbrynet on its server, and spee.ch uses the lbrynet api to make requests such as `publish`, `create_channel`, and `get`.
|
The spee.ch stack is MySQL, Express.js, Node.js, React.js. Spee.ch runs lbrynet on its server, and spee.ch uses the lbrynet api to make requests such as `publish`, `create_channel`, and `get`.
|
||||||
|
|
||||||
spee.ch also runs a sync tool, which decodes the lbry blocks as they are mined and stores the claims in a mysql. It stores all claims in the `Claims` table, and all channel claims in the `Certificates` table.
|
spee.ch also runs a sync tool, which decodes the `LBRY` blocks as they are mined and stores the claims in mysql. It stores all claims in the `Claims` table, and all channel claims in the `Certificates` table.
|
||||||
ORM ORM
ORM ORM
|
|||||||
|
|
||||||
ORM ORM
|
|||||||
|
|
||||||
ORM ORM
ORM ORM
|
|
@ -15,6 +15,6 @@ function mysql () {
|
||||||
This should probably be This should probably be `new Mysql()` since it is a class function
This should probably be This should probably be `new Mysql()` since it is a class function
|
|||||||
this.username = username;
|
this.username = username;
|
||||||
this.password = password;
|
this.password = password;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
This should probably be This should probably be `new Mysql()` since it is a class function
This should probably be This should probably be `new Mysql()` since it is a class function
|
|||||||
|
|
||||||
module.exports = new mysql();
|
module.exports = new mysql();
|
||||||
|
|
||||||
This should probably be This should probably be `new Mysql()` since it is a class function
This should probably be This should probably be `new Mysql()` since it is a class function
|
|
@ -46,6 +46,6 @@ function SiteConfig () {
|
||||||
this.customPages = customPages;
|
this.customPages = customPages;
|
||||||
this.routes = routes;
|
this.routes = routes;
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = new SiteConfig();
|
module.exports = new SiteConfig();
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
const sequelizeCliConfig = {
|
||||||
development: {
|
development: {
|
||||||
username: '',
|
username: '',
|
||||||
password: '',
|
password: '',
|
||||||
|
@ -21,3 +21,5 @@ module.exports = {
|
||||||
dialect : 'mysql',
|
dialect : 'mysql',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module.exports = sequelizeCliConfig;
|
||||||
|
|
Loading…
Reference in a new issue
ORM