fixed conflicts for merging

This commit is contained in:
bill bittner 2018-04-17 12:57:53 -07:00
commit d5f752ce5f
4 changed files with 29 additions and 28 deletions

View file

@ -1,25 +1,20 @@
# 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.
##Installation ## Installation
visit [lbryio/www.spee.ch](https://github.com/lbryio/www.spee.ch) to get started
* start spee.ch ## Development / Structure
* clone this repo * the `server/` folder contains all of the server code
* 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.
* create your ` * the `server/routes` folder contains all of the routes for the express app
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.
* copy `speechConfig.js.example` and name it `speechConfig.js` * webpack
* 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`:
* build the app by running `npm run build-prod`
* to start the server, run `npm run start`
* visit [localhost:3000](http://localhost:3000)
* start spee.ch-sync (optional, recommended)
* 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.
* install and run this [`speech-sync`](https://github.com/billbitt/spee.ch-sync) tool
## Tests ## Tests
* Spee.ch uses `mocha` with `chai` for testing. * This package uses `mocha` with `chai` for testing.
* 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
* /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)
* `file` (must be type .mp4, .jpeg, .jpg, .gif, or .png) * `file` (required) (must be type .mp4, .jpeg, .jpg, .gif, or .png)
* `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
## Contribute ## Contribute
### below is a guide to the issue tags in this repo ### Below is a guide to the issue tags in this repo
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
Issues with spee.ch that anyone with basic web development can handle, little-to-no experience with the spee.ch codebase is required.
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
Issues with spee.ch familiarity with the spee.ch codebase is required, but little-to-no familiarity with the lbry daemon is necessary
level 3 - issues with spee.ch strong familiarity with the spee.ch code base and how the lbry daemon functions is required #### level 3
Issues with spee.ch strong familiarity with the spee.ch code base and how the lbry daemon functions is required
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
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
### Stack
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.

View file

@ -15,6 +15,6 @@ function mysql () {
this.username = username; this.username = username;
this.password = password; this.password = password;
}; };
}; }
module.exports = new mysql(); module.exports = new mysql();

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;