小编Mah*_*chi的帖子

grunt-connect-proxy转发grunt连接到不同的url

问题:

我正在尝试将我的grunt服务器连接到在端口8080上运行的api服务.

问题:

:9000/secured/api/users/portal/me Failed to load resource: the server responded with a status of 503 (Service Unavailable)
Run Code Online (Sandbox Code Playgroud)

我认为即使'configureProxies:server'应用程序没有将请求重定向到好的服务器.

我的控制台:运行命令后grunt

Running "sass:dist" (sass) task

Running "copy:dev" (copy) task
Copied 80 files

Running "clean:server" (clean) task
>> 0 paths cleaned.

Running "wiredep: app" (wiredep) task

Running "configureProxies:server" (configureProxies) task
Proxy created for: /_ah,/secured,/oauth2login,/oauth2callback to localhost:8080

Running "connect:livereload" (connect) task
Started connect web server on http://localhost:9000

Running "watch" task
Waiting...
Run Code Online (Sandbox Code Playgroud)

我的Gruntfile.js:

require('load-grunt-tasks')(grunt);

var pkg = grunt.file.readJSON('package.json');
grunt.loadNpmTasks('grunt-connect-proxy');
var …
Run Code Online (Sandbox Code Playgroud)

javascript node.js gruntjs grunt-connect-proxy

7
推荐指数
0
解决办法
179
查看次数

打开自动浏览器并在使用grunt更改文件时重新加载它

我不是一个亲与繁重的,但我有我想用我的应用我试图让浏览器中打开automaticaly咕噜时启动,并重新加载页面时HTML,JS和CSS文件被修改我的角度JS模板添加了监视和livereload,但它不会工作我的代码有什么问题

这是我的gruntfile.js

module.exports = function(grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-serve');

var pkg = grunt.file.readJSON('package.json');

var options = {
  paths: {
    app: 'app',
    assets: 'app/assets',
    dist: 'app/dist',
    distAssets: 'app/dist/assets',
    html: 'app/html',
    htmlTmp: '.tmp/htmlsnapshot',
    htmlAssets: 'app/html/assets',
    index: 'app/dist/index.html',
    indexDev: 'app/index.dev.html',
    indexTmp: '.tmp/html/index.html'
  },
  watch: {
    js: {
      files: ['Gruntfile.js', 'app/assets/js/**/*.js'],
      tasks: ['jshint'],
      options: {
        livereload: true
      }
    },
    css: {
      files: [
        'app/assets/css/**/*.scss'
      ],
      tasks: ['sass'],
      options: {
        livereload: true
      }
    },
    livereload: {
      options: {
        livereload: true …
Run Code Online (Sandbox Code Playgroud)

npm angularjs gruntjs grunt-contrib-watch

5
推荐指数
1
解决办法
282
查看次数

在电子表格Google Appscript中增加单元格值

我想增加A1单元格中的值.

function increment(){
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var sheet = ss.getSheets()[0];

   var cell = sheet.getRange("A1");
   cellValue = cell.getValue("A1");
   cell.SetValue(cellValue + 1);
}
Run Code Online (Sandbox Code Playgroud)

我怎样才能做到这一点?

javascript google-apps-script

3
推荐指数
1
解决办法
5322
查看次数