s321790
(tairong)
September 30, 2018, 9:07pm
1
Use docker to create a common voice, use Firefox to open http://localhost:9000 , there is an error message
mhenretty
(Michael Henretty)
October 1, 2018, 6:47pm
2
hi @s321790 , have you tried following this:
# Setting up S3 Storage
If you don't already have one you will need a configured S3 account, and a bucket
in which to store voice clips.
** Note ** Making requests to s3 is subject to their [pricing policy](https://aws.amazon.com/s3/pricing/).
#### Set up an Amazon Services Account
1. Visit https://aws.amazon.com/s3/
2. Create a new personal account and complete verification.
#### Create a new S3 bucket:
1. Log into your new Amazon Services account:
2. Choose "S3" under the "Storage" category in the "Services" drop down.
3. Click "Create bucket"
4. Choose a bucket name. For this example guide we'll choose "voice-web".
5. Choose a region.
6. Make note of the region's associated endpoint and region from the list at https://docs.aws.amazon.com/general/latest/gr/rande.html
This file has been truncated. show original
s321790
(tairong)
October 3, 2018, 12:00pm
3
How to change the website to “https”, I already have a SSL certificate
mhenretty
(Michael Henretty)
October 4, 2018, 7:33pm
4
For local development? Or are you deploying on a server? For local, you might try this:
s321790
(tairong)
October 5, 2018, 4:29pm
5
Which file of common voice needs to be modified? Change the common voice WEB server to HTTPS.
var path = require('path')
var fs = require('fs')
var express = require('express')
var https = require('https')
var certOptions = {
key: fs.readFileSync(path.resolve('build/cert/server.key')),
cert: fs.readFileSync(path.resolve('build/cert/server.crt'))
}
var app = express()
var server = https.createServer(certOptions, app).listen(443)
mhenretty
(Michael Henretty)
October 5, 2018, 6:10pm
6
I haven’t looked into doing this myself, and unfortunately our engineer will be out until November so we won’t be able to give you full support at the moment. But here is the code you will have to modify:
this.model = new Model();
this.api = new API(this.model);
this.logger = new Logger();
this.isLeader = null;
// Make console.log output json.
if (getConfig().PROD) {
this.logger.overrideConsole();
}
const app = (this.app = express());
app.use((request, response, next) => {
// redirect to omit trailing slashes
if (request.path.substr(-1) == '/' && request.path.length > 1) {
const query = request.url.slice(request.path.length);
response.redirect(301, request.path.slice(0, -1) + query);
} else {
next();
}
});