These are the instructions for setting up a Voice developer environment.
lsb_release -a
)git
version 2.7.4 or laterFork the sc-voice repository and clone the forked repository. The HTTPS way is easiest. The SSH way is simpler in the long term because it requires less typing of credentials.
Example:
git clone git@github.com:sc-aminah/sc-voice.git
cd sc-voice
npm install
./scripts/init.sh
The init.sh
script you ran with the initial installation installed the
AWS SDK for Javascript.
To use it, you will need to:
Configure your AWS SDK (reading the documentation in full is recommended).
Set region (given in step below)
Set your credentials in Node.js
If running on Amazon EC2 load from AWS IAM, otherwise load from the shared credentials file.
Install AWS Command Line Interface: ./scripts/install-aws.sh
Set region and output type (json recommended): aws configure
npm run build
Once you have set up your Node.js credentials for AWS, you should be able to do the following to list your AWS EC2 server instances:
aws ec2 describe-instances
Even if you have no EC2 instances, the command should be successful and return:
{
"Reservations": []
}
(Note: if you encounter an AWSHTTPSConnection' object has no attribute 'server_hostname'
error, see here and try installing via the curl method in /usr/bin/aws
not /usr/local/bin/aws
)
rm -rf local/suttas
./scripts/update-latest
Once the software is completely installed and configured, the unit tests should complete successfully.
npm test
npm start
This launches the primary web server which calls AWS. It is for working on for caching, searching suttas, TTS, etc. Changes made to UI files after the server starts will not be shown. Note the HTTP port for testing (normally it is 80).
If only client UI changes are being made, it is possible to launch the Vue development web server:
npm run dev
This launches the secondary web server which is only useful for developing HTML code for the browser; all the UI Vue and Vuetify stuff. Changes made to UI files will be shown almost instantly in the browser. Note the HTTP port for testing (normally it is 8080).
Have fun! :grinning: