Multi-lingual sample app for the google-translate-server (proxy). It allows you to translate phrases to multiple languages simultaneously, using the Google translate API proxy, but there's whole lot of other stuff you can do, it's just a sample app. AngularJS 1.5.x, using wix-gruntfile as a dev framework. ###See demo here###
=> you must have bower and npm properlly installed on your computer.
- clone the repo to your computer
- run "npm install" to fetch all npm/bower dependencies, and build the project.
- run project
- for local dev: "grunt run"
- to build project: "grunt build"
- if you are encountering ruby related issues, try running
gem install bundler; bundle install;
and then repeat the process above.
Running grunt will start a local server on port 9000 that will serve the project files. By default the program will run with mock data, configured in server-api.ts. you can change the data or turn off the mocks by setting "enableMocks" property to false in "velocity.private.data.js". When running without mocks, the local server also serves as a proxy, transferring all requests from "$server_url/api/$request" to "$server_url/api/$request". Default server URL for local dev is http://localhost:9333/, as defined in proxy-settings.json file (you are advised to use google-translate-server project).
Alternativelty, to simulate heroku production mode, run grunt build
(to create the "dist" folder) and then heroku local
to simulate starting the server on heroku. In this case, an express app will serve the files from the dist you have just built. see "web.js" file for more info. You may config a ".env" file to override heroku production settings:
PORT=5000
SERVER_BASE=http://localhost:9333