gruntjs - Minimal example of using grunt-connect-proxy -


I have an angular JS app that I created with Kadaka and was written in Java running on a Tomcat server The server is backend. When I wanted to develop, I wanted to use a wire-connect-proxy to wire them together. But I could not do it in a bit of work.

All the "examples" and "demos" found on the web were used to use several hundred lines, GrantFile.JS. This did not prove to be really useful in finding my problem Min (!) What does the example look like?

How is it that you can create a minimum demo that is just a proxy for google.com Run:

Run:

Install NPM Connect Hard -proxy --save-dev npm Installation Grunt- Contrib-connect --save-dev

and create the following Gruntfile.js:

  module.exports = Function (grunt) {var proxySnippet = is required ('can not connect-proxy / lib / utils'). ProxyUxt; Grunt.initConfig {{server: {options: {hostname: 'localhost', keepalive: true, open: true, middleware: function (connect, option) {return [proxySnippet];}}, proxy: [{ ', Host:' google.com ', port: 80}]}}}); Grunt.loadNpmTasks ('grunge connect-proxy'); Grunt.loadNpmTasks ('grunting-contribution-connect'); Grunt.registerTask ('Default', ['ConfigProxies: Server', 'Connect: Server']); };  

Now just run ghurghur .


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -