Speech as a package #416
4 changed files with 29 additions and 28 deletions
49
README.md
49
README.md
|
@ -1,25 +1,20 @@
|
|||
ORM ORM
|
||||
# Spee.ch
|
||||
|
||||
spee.ch is a node-based web server that uses a lbrynet daemon to interact with the lbry network.
|
||||
ORM ORM
|
||||
This repo packages the spee.ch server for use with spee.ch implementations.
|
||||
ORM ORM
|
||||
|
||||
##Installation
|
||||
ORM ORM
|
||||
## Installation
|
||||
ORM ORM
|
||||
visit [lbryio/www.spee.ch](https://github.com/lbryio/www.spee.ch) to get started
|
||||
ORM ORM
|
||||
|
||||
* start spee.ch
|
||||
ORM ORM
|
||||
* clone this repo
|
||||
ORM ORM
|
||||
* run `npm install`
|
||||
ORM ORM
|
||||
* create your `
|
||||
ORM ORM
|
||||
speechConfig.js` file
|
||||
ORM ORM
|
||||
* copy `speechConfig.js.example` and name it `speechConfig.js`
|
||||
ORM ORM
|
||||
* replace the `null` values in the config file with the appropriate values for your environment
|
||||
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
|
||||
## Development / Structure
|
||||
ORM ORM
|
||||
* the `server/` folder contains all of the server code
|
||||
ORM ORM
|
||||
* `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
|
||||
* the `server/routes` folder contains all of the routes for the express app
|
||||
ORM ORM
|
||||
* 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
|
||||
* webpack
|
||||
ORM ORM
|
||||
* During the build process, webpack creates a bundle for this project at `index.js`:
|
||||
ORM ORM
|
||||
|
||||
## Tests
|
||||
* Spee.ch uses `mocha` with `chai` for testing.
|
||||
ORM ORM
|
||||
* This package uses `mocha` with `chai` for testing.
|
||||
ORM ORM
|
||||
* 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`
|
||||
|
||||
|
@ -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
|
||||
* example: `curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish`
|
||||
* Parameters:
|
||||
* `name`
|
||||
ORM ORM
|
||||
* `file` (must be type .mp4, .jpeg, .jpg, .gif, or .png)
|
||||
ORM ORM
|
||||
* `name` (required)
|
||||
ORM ORM
|
||||
* `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png)
|
||||
ORM ORM
|
||||
* `nsfw` (optional)
|
||||
* `license` (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
|
||||
|
||||
### below is a guide to the issue tags in this repo
|
||||
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.
|
||||
ORM ORM
|
||||
### Below is a guide to the issue tags in this repo
|
||||
ORM ORM
|
||||
####level 1
|
||||
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
|
||||
ORM ORM
|
||||
#### level 2
|
||||
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
|
||||
ORM ORM
|
||||
#### level 3
|
||||
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
|
||||
ORM ORM
|
||||
#### level 4
|
||||
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`.
|
||||
|
||||
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.
|
||||
ORM ORM
|
||||
|
||||
ORM ORM
|
||||
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
|
|
@ -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.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();
|
||||
|
|
|||
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.routes = routes;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = new SiteConfig();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
const sequelizeCliConfig = {
|
||||
development: {
|
||||
username: '',
|
||||
password: '',
|
||||
|
@ -21,3 +21,5 @@ module.exports = {
|
|||
dialect : 'mysql',
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = sequelizeCliConfig;
|
||||
|
|
Loading…
Reference in a new issue
ORM