This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| express = require('express') | |
| controllers = require('./controllers/users') | |
| app = express() | |
| app.get '/users/new', controllers.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mongoose = require('mongoose') | |
| User = mongoose.model('User') | |
| exports.new = (req, res, done) -> | |
| user = new User() | |
| res.render 'users/new', user: user |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| architect = require('express-resource-architect') | |
| mongoose = require('mongoose') | |
| resource = architect(app) | |
| resource mongoose.model('User'), require('./controllers/users') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| architect = require('express-resource-architect') | |
| c = architect.controllers() | |
| exports.new = c.new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| architect = require('express-resource-architect') | |
| m = architect.middleware() | |
| exports.new = [ | |
| m.new() | |
| m.view 'users/new', true | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| architect = require('architect') | |
| express = require('express') | |
| app = express() | |
| instance = architect(app) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: | |
| image: ruby:2.2.2 | |
| command: bundle exec rails s -b 0.0.0.0 | |
| working_dir: /usr/src/app | |
| volumes: | |
| - .:/usr/src/app | |
| ports: | |
| - 3000:3000 | |
| environment: | |
| GEM_PATH: /usr/src/app/vendor/bundle:/usr/local/bundle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| BUNDLE_PATH: vendor/bundle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker-compose run --rm web bundle install --path vendor/bundle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker-compose run --rm web rails console |
OlderNewer