The project uses Node to run a JS server in development. This will be important when we want to use urls /album or /collection instead of the basic album.html or collection.html. It may help to review our resource on NPM and
Install the project dependencies by running:
$ npm install
Run the application server:
$ npm start
The server will start up. To stop the server, press
cntrl + c.
To use the application with the Live Preview functionality of the Brackets text editor, go to File > Project Settings and add
http://localhost:3000 to the Base URL field.
The text in the application will not update on every keystroke, but changes will automatically push when you save the file.
├── LICENSE ├── README.md ├── app │ ├── assets │ │ └── images │ │ └── bloc-logo-white.png │ ├── pages │ │ └── index.html │ ├── scripts │ │ └── app.js │ ├── styles │ │ └── style.css │ └── templates │ └── home.html ├── package.json └── server.js
Add images to the
app/assets/images directory. To reference images in HTML, use the path
/assets/images/<image file name>.jpg. For example, to include the image called
bloc-white-logo.png, the path for the
src attribute in the HTML would be:
Note: A sample image has been added to
app/images. To remove the image from the application, run the following command from the root of repo:
$ rm -f app/assets/images/bloc-white-logo.png
To reference any other assets, like the music in Bloc Jams, use the path
templates directory should hold any HTML files used as templates in Angular states configured by UI Router. All other HTML files belong in the