Installing NodeJS, Foundation, and Firebase

Franz Noel edited this page Dec 19, 2015 · 6 revisions

This is a tutorial how to install NodeJS, Foundation, and Firebase.

Install NodeJS

Make sure to install NodeJS in your computer. Then, run:

sudo npm install npm -g 

Set the following directory to your ownership by running sudo chown -R owner.name <directory>:

  • /usr/local/lib/node_modules/
  • /usr/local/bin/
  • /usr/local/share/

Then, follow these steps:

  1. Create a directory using the command mkdir ~/npm-global
  2. Configure npm to set the directory using the following command npm config set prefix ~/npm-global/
  3. Create a file named ~/.profile and add the path export PATH=~/npm-global/bin:$PATH
  4. Type reset in the terminal

Install Foundation

Follow these steps:

  1. Install Foundation command line in npm using npm install -g foundation-cli
  2. Go to ~/Github directory (or the directory for your projects) and run foundation new.
  3. Choose "A site" as the installation
  4. Enter your site name and choose ZURB Template
  5. Change directory ~/Github/your-web-site

Install Firebase

Follow these steps:

  1. Install firebase command line using npm install -g firebase-tools
  2. Run firebase init and enter your-web-site name.
  3. Run npm start, and it will populate the dist folder with your site.
  4. Choose dist as your main directory for Firebase.
  5. Install a local server using npm install -g serve.
  6. Run serve dist to indicate that you're referring to the Foundation compiled site.
  7. Try to access Firebase in your localhost. For example, localhost:3000.

Deployment

  1. Run firebase deploy
  2. Run firebase open to open your site automatically.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.