Home Hacker News Building a Hacker News Clone in AngularJS – Post 1, Part D: Adding gitignore & Testing Angular

Building a Hacker News Clone in AngularJS – Post 1, Part D: Adding gitignore & Testing Angular

23
0

Building a Hacker News Clone in AngularJS – Part 1

Hi Everyone! I’m Dakota Lee Martinez. In this video series I’ll be using the Hacker News API to build out a Hacker News Clone in AngularJS.

These videos are accompanied by a series of blog posts at becomingaprogrammer.com. You can find the written explanation of the process and code samples there.

Building a Hacker News Clone in AngularJS – Part 1

This video covers the following topics:

* Adding a package.json file to the project
* Running npm install
* Adding a .gitignore file to our project
* Creating a file called server.js
* Using node to start a local server
* Testing angular functionality by adding some two-way data binding.

You’ll need to create a package.json file in the root of the project and paste in the following content:

{
“name”: “testing-controllers”,
“version”: “1.0.0”,
“devDependencies”: {
“jasmine-core”: “^2.4.1”,
“karma”: “^0.13.19”,
“karma-chrome-launcher”: “^0.2.2”,
“karma-jasmine”: “^0.3.6”,
“karma-spec-reporter”: “0.0.23”
},
“dependencies”: {
“express”: “^4.13.4”
}
}

You’ll also need to create a file called server.js and copy/paste the following code into it:

var express = require(‘express’);
var app = express();

app.use(express.static(__dirname));

app.listen(8080);

console.log(‘Server started at http://localhost:8080’);

source

LEAVE YOUR COMMENT

Your email address will not be published. Required fields are marked *

WordPress Anti Spam by WP-SpamShield

Close

Powered by moviekillers.com