A repo for every time you ask yourself, "How do I do that again...?"
=========================
mkdir MY_APP
mkdir views && touch index.html
mkdir styles && touch style.css
mkdir scripts (or javascripts) && touch index.js
mkdir FOLDER_NAME
cd FOLDER_NAME
touch app.js
npm init
git init
touch .gitignore
echo "node_modules >> .gitignore"
npm install --save WHATEVER_MODULE_YOU_NEED
configure your app.js
var express = require("express")
var app = express();
app.get("/", function(req, res){ // do some stuff here })
app.listen(3000)
rails new -TBd postgresql
-T
removes the test folder (if you choose to use rspec instead)-B
skips the bundle install upon app generation (if you plan to immidiately add to your Gemfile this is a good choice)-d ______
specifies the database you choose to work with (default is sqlite3)
bundle
(or bundle install)rake db:create db:migrate
- Optionally:
rake db:seed
rake db:rollback
git init
rails s
- Include angular either using the
angular-gem
or cdn<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
- In a JS file include
var myApp = angular.module('myApp', [])
remember the empty array is where your dependencies will go - Include in your HTML tag
<html ngApp = "myApp">
- rspec init
- In your gemfile add
group :development, :test do
gem 'rspec-rails', '~> 3.0'
end
rails generate rspec:install