Speech as a package #416

Merged
bones7242 merged 89 commits from speech-as-a-package into master 2018-04-18 21:47:34 +02:00
4 changed files with 29 additions and 28 deletions
Showing only changes of commit d5f752ce5f - Show all commits

View file

@ -1,25 +1,20 @@
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
##Installation ## Installation
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
visit [lbryio/www.spee.ch](https://github.com/lbryio/www.spee.ch) to get started
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* start spee.ch ## Development / Structure
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* clone this repo * the `server/` folder contains all of the server code
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* create your ` * the `server/routes` folder contains all of the routes for the express app
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* copy `speechConfig.js.example` and name it `speechConfig.js` * webpack
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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`:
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* build the app by running `npm run build-prod`
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* to start the server, run `npm run start`
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* visit [localhost:3000](http://localhost:3000)
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* start spee.ch-sync (optional, recommended)
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* install and run this [`speech-sync`](https://github.com/billbitt/spee.ch-sync) tool
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
## Tests ## Tests
* Spee.ch uses `mocha` with `chai` for testing. * This package uses `mocha` with `chai` for testing.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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)
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
* `file` (must be type .mp4, .jpeg, .jpg, .gif, or .png) * `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png)
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
Issues with spee.ch strong familiarity with the spee.ch code base and how the lbry daemon functions is required
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
### Stack
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

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.
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM

neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM
neb-b commented 2018-04-17 22:27:10 +02:00 (Migrated from github.com)
Review

ORM

ORM

View file

@ -15,6 +15,6 @@ function mysql () {
neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function
neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function
this.username = username; this.username = username;
this.password = password; this.password = password;
}; };
}; }
neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function
neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function
module.exports = new mysql(); module.exports = new mysql();

neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function
neb-b commented 2018-04-17 22:32:37 +02:00 (Migrated from github.com)
Review

This should probably be new Mysql() since it is a class function

This should probably be `new Mysql()` since it is a class function

View file

@ -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();

View file

@ -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;