Tag: angular fullstack

Yeoman应用程序部署到Heroku的问题

我一直在尝试将我的AngularFullstack(节点)应用程序部署到Heroku。 我在terminal中创build了应用程序: yo angular-fullstack 。 每当我尝试部署到Heroku,当我去我的部署应用程序时,我得到以下内容: 应用程序错误 应用程序发生错误,您的页面无法送达。 请稍后重试。 如果您是应用程序所有者,请查看日志以获取详细信息。 日志是: 2015-07-24T06:57:35.184227+00:00 heroku[web.1]: State changed from up to starting 2015-07-24T06:57:38.772056+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2015-07-24T06:57:39.757747+00:00 app[web.1]: Error waiting for process to terminate: No child processes 2015-07-24T06:57:40.645233+00:00 heroku[web.1]: Process exited with status 22 2015-07-24T06:57:49.314501+00:00 heroku[web.1]: Starting process with command `npm start` 2015-07-24T06:57:51.176323+00:00 app[web.1]: Detected […]

generator-angular-fullstack:如何运行服务器

通常你用典型的方式启动整个应用程序: grunt serve 但是这启动了整个应用程序,用sass编译等等。 有没有办法启动服务器端? 我肯定错过了什么! 我很乐意能够在Api部分工作,并快速testing,而无需启动整个应用程序。 grunt serve-server // or something random like that?

Webstorm node.js远程debugging不会跳转到断点

我正在使用angular-fullstack生成器和Webstorm 10。 node.js远程debuggingconfiguration: localhost: 127.0.0.1 port: 5858 当我input“grunt serve:debug”时: Debugger listening on port 5858 Node Inspector v0.9.2 Visit http://localhost:8080/debug?port=5858 to start debugging. Express server listening on 9000, in development mode 此时localhost:8080 / debug?port = 5858打开,然后启动我的node.js远程debugging器。 它说: Connected to localhost:5858 然而,框架窗格是完全空白的,所有的断点都被忽略。

节点没有从Gruntfilefind依赖关系

我一直在使用Yeoman的全angular度发电机,一周前它工作的很好。 现在,在生成新的应用程序之后,节点无法添加Gruntfile.js中的连线依赖项。 基本上,我必须安装所有应该用npm install解决的依赖关系。 在安装了十几个npm软件包(如jit-grunt,jshint等)之后,grunt build / serve将会完成,但该应用程序不会在浏览器中加载。 我确定这是一个node / npm问题,因为应用程序生成器在一个星期前就开始工作了。 我试过完全卸载并重新安装。 任何猜测,为什么发生这种情况? 尽pipe我用不同的npm版本得到相同的行为,现在我在: npm:3.3.12节点:4.2.1 grunt-cli:0.1.13 grunt:0.4.5 当我手动安装这些软件包时,我也收到了这个错误信息,我觉得它可能是相关的: Ryans-MacBook-Pro:appTest nonzero$ npm install jit-grunt –save-dev app-test@0.0.0 /Users/nonzero/Programming/appTEST └── (empty) npm ERR! code 1

客户端无法击中自己的服务器端点

我有一个AngularFullStack项目,我试图用下面的代码打我的项目的服务器端点,但问题是调用不是从angular度客户端到nodejs服务器。 由于这是我的第一个项目,我很less不知道可能会出现什么问题,可能会导致这个奇怪的冲突。 客户端: $http({ method: 'POST', url: '/api/soapAPIs/soapAPI', data: request, headers: { 'Content-Type': 'application/json' } }) .then(function(response) { console.log("response from server is: ", response); }) .catch(function(error) { console.log("error in calling server is: ", error); }); 我已经在服务器端安装了CORS,并在app.js中写下了下面的代码,但仍然无效。 服务器App.js // Setup server var app = express(); var cors = require('cors'); //add cors to do the cross site […]

你如何debuggingnodejs项目?

在过去16个小时左右,我一直在试图在我的电脑上运行一个MEAN堆栈项目。 我从Yeoman的angular度全面项目开始 。 但那是给了我各种各样的错误,所以我就放弃了。 然后我跟着一些帮助我开始的教程,但没有涉及到我的问题。 然后,我发现mean.io提供了一个完整的样板MEAN堆栈项目,我按照说明来设置。 不幸的是,当我尝试运行它时,我再次遇到各种错误:-( 最糟糕的是,它没有说什么/在哪里造成的错误。 有人能帮我弄明白吗? 请 :-) 我得到的最新错误是当我运行grunt 。 C:\Users\Imray\projects Practice\meanIO\meanApp>grunt Running "hook" task >> Starting hooked tasks. Running "clean:0" (clean) task >> 0 paths cleaned. Running "jshint:all" (jshint) task >> 42 files lint free. Running "csslint:src" (csslint) task >> 5 files lint free. Running "concurrent:tasks" (concurrent) task Running "watch" task […]

如何使用没有服务器组件的Angular-fullstack?

我非常喜欢Angular-Fullstack搭build这个项目的方式。 但是我已经通过一个平静的API提供了数据。 所以我不需要任何服务器组件。 有没有办法,我只能使用客户端部分,并删除服务器组件? 更新:我知道发电机 – angular支架,但我想要的方式Fullstack脚手架。 谢谢。

为什么不加载节点的“fs”模块? (错误:对象#<对象>没有方法'readFile')

出于某种原因,我的快递服务器没有正确加载文件系统的“FS”模块。 我正在使用angular-fullstack yeoman生成器。 我的系统是Windows 7,节点版本为0.10.35,npm版本为2.1.18,最新版本为angular-fullstack。 我已经尝试了各种各样的东西,比如32位和64位,并且更新了一切。 routes.js(其他路线加载正常): 'use strict'; var errors = require('./components/errors'); var express = require('express'); var fs = require('fs'); module.exports = function(app) { app.route('/pdf/*') .get(function(req, res) { var pdfPath = app.get('appPath') + '/assets/pdf/test.pdf'; fs.readfile(pdfPath, function(error, data) { res.setHeader('Content-Disposition', 'attachment; filename="test.pdf"'); res.setHeader('Content-Type', 'application/pdf'); res.setHeader('Content-Length', data.length); res.status(200).end(data, 'binary'); }); }); // All undefined asset or […]

为yeoman angular-fullstack项目添加新的依赖项

我已经开始在js节点上创build一个新项目,并且使用yeoman的angular fullstack生成器生成了这个项目。 现在我想添加一个新的bower依赖项和一个新的节点依赖项。 做这个的最好方式是什么? 我应该简单地将依赖项添加到bower.json和package.json中,还是应该运行特定的命令?

可能的问题与Muller? 错误:Router.use()需要callback

用yeoman angular-fullstack构build一个网站在本地效果很好,但是当我部署和使用dist / release版本时,在我的服务器上给了我这个有趣的错误。 Error: Router.use() requires callback functions but got a [object Object] at Function.proto.use (/home/bitnami/htdocs/dist/node_modules/express/lib/router/index.js:327:11) at Object.<anonymous> (/home/bitnami/htdocs/dist/server/api/save/index.js:10:8) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.<anonymous> (/opt/bitnami/nodejs/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21) at Module.require (module.js:365:17) at require (module.js:384:17) at module.exports (/home/bitnami/htdocs/dist/server/routes.js:13:25) 它接近它在这条线上的失败 router.use(multer({ dest: './public/uploads/'})); 虽然它在当地工作完全罚款? 让我有点难住。 不知道它是否与垂涎有关? 我有节点模块安装。 思考?