Javascript/nodejs/tower
提供: 初心者エンジニアの簡易メモ
towerとは
rails風フルスタックフレームワーク
必須
npm install -g mongodb
towerインストール
npm install -g tower
新規プロジェクト作成
tower new hellotower1
最後フリーズと勘違いするほど重かったがしばらくすると作成された。
create : hellotower1/.gitignore create : hellotower1/.npmignore create : hellotower1/.slugignore create : hellotower1/Cakefile create : hellotower1/app/client/config/application.coffee create : hellotower1/app/client/helpers create : hellotower1/app/client/stylesheets/application.styl create : hellotower1/app/client/controllers/applicationController.coffee create : hellotower1/app/controllers/applicationController.coffee create : hellotower1/app/helpers/applicationHelper.coffee create : hellotower1/app/mailers create : hellotower1/app/models create : hellotower1/app/views/welcome.coffee create : hellotower1/app/views/layouts/application.coffee create : hellotower1/app/views/shared/_footer.coffee create : hellotower1/app/views/shared/_header.coffee create : hellotower1/app/views/shared/_meta.coffee create : hellotower1/app/views/shared/_navigation.coffee create : hellotower1/app/views/shared/_sidebar.coffee create : hellotower1/config/application.coffee create : hellotower1/config/assets.coffee create : hellotower1/config/credentials.coffee create : hellotower1/config/databases.coffee create : hellotower1/config/routes.coffee create : hellotower1/config/session.coffee create : hellotower1/config/environments/development.coffee create : hellotower1/config/environments/production.coffee create : hellotower1/config/environments/test.coffee create : hellotower1/config/initializers create : hellotower1/config/locales/en.coffee create : hellotower1/db/seeds.coffee create : hellotower1/lib/tasks create : hellotower1/log create : hellotower1/package.json create : hellotower1/Procfile create : hellotower1/public/404.html create : hellotower1/public/500.html create : hellotower1/public/favicon.png create : hellotower1/public/crossdomain.xml create : hellotower1/public/humans.txt create : hellotower1/public/robots.txt create : hellotower1/public/images create : hellotower1/public/javascripts/app/views/templates.js create : hellotower1/public/stylesheets create : hellotower1/public/swfs create : hellotower1/README.md create : hellotower1/server.js create : hellotower1/test/controllers create : hellotower1/test/factories create : hellotower1/test/features create : hellotower1/test/models create : hellotower1/test/server.coffee create : hellotower1/test/client.coffee create : hellotower1/test/mocha.opts create : hellotower1/tmp create : hellotower1/vendor/javascripts/bootstrap create : hellotower1/vendor/stylesheets/bootstrap create : hellotower1/Watchfile create : hellotower1/vendor/javascripts/html5.js create : hellotower1/vendor/stylesheets/prettify.css create : hellotower1/vendor/javascripts/prettify.js create : hellotower1/vendor/javascripts/design.io.js create : hellotower1/vendor/javascripts/coffeekup.js create : hellotower1/vendor/javascripts/underscore.string.js create : hellotower1/vendor/javascripts/async.js create : hellotower1/vendor/javascripts/history.adapter.jquery.js create : hellotower1/public/images/glyphicons-halflings-white.png create : hellotower1/public/images/glyphicons-halflings.png create : hellotower1/vendor/javascripts/history.js create : hellotower1/vendor/javascripts/underscore.js create : hellotower1/vendor/javascripts/socket.io.js create : hellotower1/vendor/javascripts/uri.js create : hellotower1/vendor/javascripts/geolib.js create : hellotower1/vendor/javascripts/sinon.js create : hellotower1/vendor/javascripts/moment.js create : hellotower1/vendor/javascripts/inflection.js create : hellotower1/vendor/javascripts/validator.js create : hellotower1/vendor/javascripts/accounting.js Error downloading https://raw.github.com/logicalparadox/chai/master/chai.js create : hellotower1/vendor/javascripts/mocha.js create : hellotower1/vendor/javascripts/tower.js create : hellotower1/vendor/javascripts/factory.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-alert.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-carousel.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-button.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-dropdown.js create : hellotower1/vendor/javascripts/faker.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-popover.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-collapse.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-scrollspy.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-modal.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-tab.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-tooltip.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-transition.js create : hellotower1/vendor/javascripts/bootstrap/bootstrap-typeahead.js create : hellotower1/vendor/stylesheets/mocha.css create : hellotower1/vendor/stylesheets/bootstrap/accordion.less create : hellotower1/vendor/stylesheets/bootstrap/alerts.less create : hellotower1/vendor/stylesheets/bootstrap/bootstrap.less create : hellotower1/vendor/stylesheets/bootstrap/breadcrumbs.less create : hellotower1/vendor/stylesheets/bootstrap/button-groups.less create : hellotower1/vendor/stylesheets/bootstrap/buttons.less create : hellotower1/vendor/stylesheets/bootstrap/carousel.less create : hellotower1/vendor/stylesheets/bootstrap/close.less create : hellotower1/vendor/stylesheets/bootstrap/code.less create : hellotower1/vendor/stylesheets/bootstrap/dropdowns.less create : hellotower1/vendor/stylesheets/bootstrap/component-animations.less create : hellotower1/vendor/stylesheets/bootstrap/forms.less create : hellotower1/vendor/stylesheets/bootstrap/grid.less create : hellotower1/vendor/stylesheets/bootstrap/labels-badges.less create : hellotower1/vendor/stylesheets/bootstrap/layouts.less create : hellotower1/vendor/stylesheets/bootstrap/modals.less create : hellotower1/vendor/stylesheets/bootstrap/mixins.less create : hellotower1/vendor/stylesheets/bootstrap/navbar.less create : hellotower1/vendor/stylesheets/bootstrap/hero-unit.less create : hellotower1/vendor/stylesheets/bootstrap/navs.less create : hellotower1/vendor/javascripts/ember.js create : hellotower1/vendor/stylesheets/bootstrap/pager.less create : hellotower1/vendor/stylesheets/bootstrap/pagination.less create : hellotower1/vendor/stylesheets/bootstrap/popovers.less create : hellotower1/vendor/stylesheets/bootstrap/progress-bars.less create : hellotower1/vendor/stylesheets/bootstrap/reset.less create : hellotower1/vendor/stylesheets/bootstrap/responsive.less create : hellotower1/vendor/stylesheets/bootstrap/scaffolding.less create : hellotower1/vendor/stylesheets/bootstrap/tables.less create : hellotower1/vendor/stylesheets/bootstrap/thumbnails.less create : hellotower1/vendor/stylesheets/bootstrap/sprites.less create : hellotower1/vendor/stylesheets/bootstrap/tooltip.less create : hellotower1/vendor/stylesheets/bootstrap/type.less create : hellotower1/vendor/stylesheets/bootstrap/variables.less create : hellotower1/vendor/stylesheets/bootstrap/utilities.less create : hellotower1/vendor/stylesheets/bootstrap/wells.less create : hellotower1/public/swfs/WebSocketMain.swf create : hellotower1/public/swfs/WebSocketMainInsecure.swf
失敗したchaiは以下からダウンロード
cd /tmp git init git clone https://github.com/chaijs/chai cd chai cp /tmp/chai/chai.js /var/www/nodejs/testtower/vendor/javascripts/chai.js
起動
node server.js
httpアクセス
http://localhost:3000
javascriptとcss移動
mkdir /var/www/nodejs/testtower/public/javascripts/vendor mkdir /var/www/nodejs/testtower/public/stylesheets/vendor ln -s /var/www/nodejs/testtower/vendor/javascripts /var/www/nodejs/testtower/public/javascripts/vendor/javascripts ln -s /var/www/nodejs/testtower/vendor/stylesheets /var/www/nodejs/testtower/public/stylesheets/vendor/stylesheets