Web development Setup
LAMP
A LAMP (Linux, Apache, MySQL, PHP) stack is a common, free and open-source web stack used for hosting web content in a Linux environment.
Step 1: install a Ubuntu Linux
(option A) Install Linux as a dual boot system Install from a CD or download a iso file and burned to a CD. Use this CD to install on to your PC.
https://help.ubuntu.com/community/Installation
(option B) Install a Ubuntu Linux on a virtual machine (Windows 7 or Windows 8) You can install VM on you windows/Mac. Two popular virtual machine offering(free) are VMWare's VM, vmplayer is free, and Oracle's Virtualbox. You can install ubuntu OS for the VM.
https://www.virtualbox.org/
http://www.vmware.com/products/player/
Step 2: Run this command from a Linux command line to install LAMP (Linux, Apache, Mysql, Php) sudo apt-get install lamp-server (install LAMP)
Step 3: sudo apt-get install git-core (install git)
Step 4: cd (back to home directory) mkdir projects cd projects
git clone https://[email protected]/cbcgbsite/kai.git
(password)
Step 5: cd ~/projects/kai/build/db cp -p kai_db.sql.template kai_db.sql cp -p setenv.sh.template setenv.sh
edit setenv.sh on the following statements
DB_ROOT=root
DB_ROOT_PASSWORD=xxxxx (your PC's root password)
PROJECT_ROOT=/home/xxxxx/projects/kai (/home/xxxxx is your login home directory)
Step 6: cd ~/projects/kai/build/db ./create-import.sh
Step 7: cd ~/projects/kai/drupal/sites/default chmod -R 777 files
How to run it:
1) Start a firefox browser. 2) type in kai.dev on the url. 3) click right up cornor "account" to log in. 4) start your development task.
MEAN
The MEAN stack is one of the most common JavaScript full stack frameworks. It is built on top of MongoDB, Express, AngularJS, and Node.js.
package.json
The package.json file is core to the Node.js ecosystem and is a basic part of understanding and working with Node.js, npm, and even modern JavaScript.
The main
property of a package.json is a direction to the entry point to the module that the package.json is describing. In a Node.js application, when the module is called via a require
statement, the module's exports from the file named in the main property will be what's returned to the Node.js application.
Tilde & Caret Shorthand
Node.js' implementation of semver also introduces shorthand ranges: ~ (tilde) and ^ (caret).
The general explanation for how these work is:
Prefixing a single semver version string with the ~ character defines a range of acceptable versions that include all patch versions from the one specified up to, but not including, the next minor version. "~1.2.3" can be approximately expanded as ">=1.2.3 <1.3.0".
Prefixing a single semver version string with the ^ character defines a range of acceptable versions that include all patch and minor versions from the ones specified up to, but not including, the next version. So "^1.2.3" can be approximately expanded as ">=1.2.3 <2.0.0".