Git Product home page Git Product logo

google-translate-client's Introduction

google-translate-client

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###

Build Status

Setup

=> you must have bower and npm properlly installed on your computer.

  1. clone the repo to your computer
  2. run "npm install" to fetch all npm/bower dependencies, and build the project.
  3. run project
  4. for local dev: "grunt run"
  5. 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.

Local dev

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

google-translate-client's People

Contributors

guyrotem avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.