【发布时间】:2014-08-22 20:48:35
【问题描述】:
我是前端 + PHP 开发人员,不熟悉 Node + Express 和 Ember JS。我习惯了像 CodeIgniter 这样的 MVC 框架。我非常了解 CodeIgniter 的文件夹结构(将我的视图、CSS、控制器等放在哪里),但我很难理解如何组织我的 Node + Express + Ember 应用程序。我想了解如何构建应用程序。
我只是将使用 Ember CLI 创建的应用程序转储到我的 Node + Express 应用程序的公共文件夹中。这是正确的方法吗?此外,这似乎会导致 Ember Build 出现错误。
Nagarjuns-MacBook-Pro:public nagarjun$ ember build
version: 0.0.40
Building
app/app.js: line 1, col 1, 'import' is only available in ES6 (use esnext option).
app/app.js: line 2, col 1, 'import' is only available in ES6 (use esnext option).
app/app.js: line 3, col 1, 'import' is only available in ES6 (use esnext option).
app/app.js: line 14, col 1, 'export' is only available in ES6 (use esnext option).
4 errors
app/router.js: line 1, col 1, 'import' is only available in ES6 (use esnext option).
app/router.js: line 11, col 1, 'export' is only available in ES6 (use esnext option).
2 errors
app/routes/sign-in.js: line 1, col 1, 'import' is only available in ES6 (use esnext option).
app/routes/sign-in.js: line 3, col 1, 'export' is only available in ES6 (use esnext option).
2 errors
===== 3 JSHint Errors
Built project successfully. Stored in "dist/".
当我在运行node bin/www 后加载我的项目时,我仍然只能看到 Express 默认布局。考虑到 Express 在其自己的 Views 文件夹中使用 Jade 模板,我对如何组织我的项目有很多困惑。我只是忽略那个文件夹吗?
【问题讨论】: