Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions Gruntfile.js

This file was deleted.

3 changes: 0 additions & 3 deletions README.md

This file was deleted.

1 change: 1 addition & 0 deletions studentchat/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
36 changes: 36 additions & 0 deletions studentchat/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# node-js-getting-started

A barebones Node.js app using [Express 4](http://expressjs.com/).

This application support the [Getting Started with Node on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs) article - check it out.

## Running Locally

Make sure you have [Node.js](http://nodejs.org/) and the [Heroku Toolbelt](https://toolbelt.heroku.com/) installed.

```sh
$ git clone [email protected]:heroku/node-js-getting-started.git # or clone your own fork
$ cd node-js-getting-started
$ npm install
$ npm start
```

Your app should now be running on [localhost:5000](http://localhost:5000/).

## Deploying to Heroku

```
$ heroku create
$ git push heroku master
$ heroku open
```

## Documentation

For more information about using Node.js on Heroku, see these Dev Center articles:

- [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/getting-started-with-nodejs)
- [Heroku Node.js Support](https://devcenter.heroku.com/articles/nodejs-support)
- [Node.js on Heroku](https://devcenter.heroku.com/categories/nodejs)
- [Best Practices for Node.js Development](https://devcenter.heroku.com/articles/node-best-practices)
- [Using WebSockets on Heroku with Node.js](https://devcenter.heroku.com/articles/node-websockets)
7 changes: 7 additions & 0 deletions studentchat/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Node.js Getting Started",
"description": "A barebones Node.js app using Express 4",
"repository": "https://github.com/heroku/node-js-getting-started",
"logo": "http://node-js-sample.herokuapp.com/node.svg",
"keywords": ["node", "express", "static"]
}
2 changes: 2 additions & 0 deletions studentchat/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

module.exports = require('./lib');
166 changes: 166 additions & 0 deletions studentchat/npm-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'cd',
1 verbose cli 'node_modules' ]
2 info using [email protected]
3 info using [email protected]
4 verbose readDependencies using package.json deps
5 verbose cache add [ 'cd', null ]
6 verbose cache add name=undefined spec="cd" args=["cd",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
7 verbose parsed url host: null,
7 verbose parsed url port: null,
7 verbose parsed url hostname: null,
7 verbose parsed url hash: null,
7 verbose parsed url search: null,
7 verbose parsed url query: null,
7 verbose parsed url pathname: 'cd',
7 verbose parsed url path: 'cd',
7 verbose parsed url href: 'cd' }
8 verbose cache add [ 'node_modules', null ]
9 verbose cache add name=undefined spec="node_modules" args=["node_modules",null]
10 verbose parsed url { protocol: null,
10 verbose parsed url slashes: null,
10 verbose parsed url auth: null,
10 verbose parsed url host: null,
10 verbose parsed url port: null,
10 verbose parsed url hostname: null,
10 verbose parsed url hash: null,
10 verbose parsed url search: null,
10 verbose parsed url query: null,
10 verbose parsed url pathname: 'node_modules',
10 verbose parsed url path: 'node_modules',
10 verbose parsed url href: 'node_modules' }
11 silly lockFile 03477819-cd cd
12 verbose lock cd /Users/jasondunne/.npm/03477819-cd.lock
13 silly lockFile 9193e35d-node-modules node_modules
14 verbose lock node_modules /Users/jasondunne/.npm/9193e35d-node-modules.lock
15 silly lockFile 03477819-cd cd
16 silly lockFile 03477819-cd cd
17 verbose addNamed [ 'cd', '' ]
18 verbose addNamed [ null, '*' ]
19 silly lockFile 086ccedd-cd cd@
20 verbose lock cd@ /Users/jasondunne/.npm/086ccedd-cd.lock
21 silly lockFile 9193e35d-node-modules node_modules
22 silly lockFile 9193e35d-node-modules node_modules
23 silly addNameRange { name: 'cd', range: '*', hasData: false }
24 verbose addNamed [ 'node_modules', '' ]
25 verbose addNamed [ null, '*' ]
26 silly lockFile 1f43ecc2-node-modules node_modules@
27 verbose lock node_modules@ /Users/jasondunne/.npm/1f43ecc2-node-modules.lock
28 verbose request where is /cd
29 verbose request registry https://registry.npmjs.org/
30 verbose request id e7bf70d92bc22eba
31 verbose url raw /cd
32 verbose url resolving [ 'https://registry.npmjs.org/', './cd' ]
33 verbose url resolved https://registry.npmjs.org/cd
34 verbose request where is https://registry.npmjs.org/cd
35 info trying registry request attempt 1 at 20:08:07
36 http GET https://registry.npmjs.org/cd
37 silly addNameRange { name: 'node_modules', range: '*', hasData: false }
38 verbose request where is /node_modules
39 verbose request registry https://registry.npmjs.org/
40 verbose url raw /node_modules
41 verbose url resolving [ 'https://registry.npmjs.org/', './node_modules' ]
42 verbose url resolved https://registry.npmjs.org/node_modules
43 verbose request where is https://registry.npmjs.org/node_modules
44 info trying registry request attempt 1 at 20:08:07
45 http GET https://registry.npmjs.org/node_modules
46 http 404 https://registry.npmjs.org/node_modules
47 verbose headers { date: 'Thu, 30 Oct 2014 00:08:07 GMT',
47 verbose headers server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
47 verbose headers 'content-type': 'application/json',
47 verbose headers 'cache-control': 'max-age=0',
47 verbose headers 'content-length': '52',
47 verbose headers 'accept-ranges': 'bytes',
47 verbose headers via: '1.1 varnish',
47 verbose headers age: '0',
47 verbose headers 'x-served-by': 'cache-atl6223-ATL',
47 verbose headers 'x-cache': 'MISS',
47 verbose headers 'x-cache-hits': '0',
47 verbose headers 'x-timer': 'S1414627687.869601,VS0,VE79',
47 verbose headers connection: 'close' }
48 silly registry.get cb [ 404,
48 silly registry.get { date: 'Thu, 30 Oct 2014 00:08:07 GMT',
48 silly registry.get server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
48 silly registry.get 'content-type': 'application/json',
48 silly registry.get 'cache-control': 'max-age=0',
48 silly registry.get 'content-length': '52',
48 silly registry.get 'accept-ranges': 'bytes',
48 silly registry.get via: '1.1 varnish',
48 silly registry.get age: '0',
48 silly registry.get 'x-served-by': 'cache-atl6223-ATL',
48 silly registry.get 'x-cache': 'MISS',
48 silly registry.get 'x-cache-hits': '0',
48 silly registry.get 'x-timer': 'S1414627687.869601,VS0,VE79',
48 silly registry.get connection: 'close' } ]
49 silly lockFile 1f43ecc2-node-modules node_modules@
50 silly lockFile 1f43ecc2-node-modules node_modules@
51 http 200 https://registry.npmjs.org/cd
52 silly registry.get cb [ 200,
52 silly registry.get { date: 'Thu, 30 Oct 2014 00:08:08 GMT',
52 silly registry.get server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
52 silly registry.get etag: '"EWAO8NWVJFVIM8PTAQPBJC1FX"',
52 silly registry.get 'content-type': 'application/json',
52 silly registry.get 'cache-control': 'max-age=60',
52 silly registry.get 'content-length': '23546',
52 silly registry.get 'accept-ranges': 'bytes',
52 silly registry.get via: '1.1 varnish',
52 silly registry.get age: '0',
52 silly registry.get 'x-served-by': 'cache-atl6226-ATL',
52 silly registry.get 'x-cache': 'MISS',
52 silly registry.get 'x-cache-hits': '0',
52 silly registry.get 'x-timer': 'S1414627687.867203,VS0,VE147',
52 silly registry.get vary: 'Accept',
52 silly registry.get connection: 'close' } ]
53 silly addNameRange number 2 { name: 'cd', range: '*', hasData: true }
54 silly addNameRange versions [ 'cd',
54 silly addNameRange [ '0.0.1',
54 silly addNameRange '0.0.2',
54 silly addNameRange '0.1.0',
54 silly addNameRange '0.1.1',
54 silly addNameRange '0.1.2',
54 silly addNameRange '0.1.3',
54 silly addNameRange '0.2.0',
54 silly addNameRange '0.2.2',
54 silly addNameRange '0.3.0',
54 silly addNameRange '0.3.1',
54 silly addNameRange '0.3.2',
54 silly addNameRange '0.3.3' ] ]
55 verbose addNamed [ 'cd', '0.3.3' ]
56 verbose addNamed [ '0.3.3', '0.3.3' ]
57 silly lockFile 88438eb9-cd-0-3-3 [email protected]
58 verbose lock [email protected] /Users/jasondunne/.npm/88438eb9-cd-0-3-3.lock
59 silly lockFile 43e09ac3-gistry-npmjs-org-cd-cd-0-3-3-tgz https://registry.npmjs.org/cd/-/cd-0.3.3.tgz
60 verbose lock https://registry.npmjs.org/cd/-/cd-0.3.3.tgz /Users/jasondunne/.npm/43e09ac3-gistry-npmjs-org-cd-cd-0-3-3-tgz.lock
61 verbose addRemoteTarball [ 'https://registry.npmjs.org/cd/-/cd-0.3.3.tgz',
61 verbose addRemoteTarball '108ecb57bff93b96b9115c54573cfef3008ef94d' ]
62 info retry fetch attempt 1 at 20:08:08
63 verbose fetch to= /var/folders/qp/50mhjy6x0zbcwdzlv6_v4nm40000gn/T/npm-64768-flteYDca/registry.npmjs.org/cd/-/cd-0.3.3.tgz
64 http GET https://registry.npmjs.org/cd/-/cd-0.3.3.tgz
65 http 200 https://registry.npmjs.org/cd/-/cd-0.3.3.tgz
66 silly lockFile 43e09ac3-gistry-npmjs-org-cd-cd-0-3-3-tgz https://registry.npmjs.org/cd/-/cd-0.3.3.tgz
67 silly lockFile 43e09ac3-gistry-npmjs-org-cd-cd-0-3-3-tgz https://registry.npmjs.org/cd/-/cd-0.3.3.tgz
68 silly lockFile 88438eb9-cd-0-3-3 [email protected]
69 silly lockFile 88438eb9-cd-0-3-3 [email protected]
70 silly lockFile 086ccedd-cd cd@
71 silly lockFile 086ccedd-cd cd@
72 error 404 404 Not Found: node_modules
72 error 404
72 error 404 'node_modules' is not in the npm registry.
72 error 404 You should bug the author to publish it
72 error 404 It was specified as a dependency of 'node-js-getting-started'
72 error 404
72 error 404 Note that you can also install from a
72 error 404 tarball, folder, or http url, or git url.
73 error System Darwin 14.0.0
74 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "cd" "node_modules"
75 error cwd /Users/jasondunne/Documents/studentchat/node-js-getting-started
76 error node -v v0.13.0-pre
77 error npm -v 1.4.28
78 error code E404
79 verbose exit [ 1, true ]
26 changes: 26 additions & 0 deletions studentchat/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "node-js-getting-started",
"version": "0.1.2",
"description": "A sample Node.js app using Express 4",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"express": "^4.9.8",
"socket.io": "1.2.0"
},
"engines": {
"node": "0.10.x"
},
"repository": {
"type": "git",
"url": "https://github.com/heroku/node-js-getting-started"
},
"keywords": [
"node",
"heroku",
"express"
],
"license": "MIT"
}
28 changes: 28 additions & 0 deletions studentchat/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Socket.IO Chat Example</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<ul class="pages">
<li class="chat page">
<div class="chatArea">
<ul class="messages"></ul>
</div>
<input class="inputMessage" placeholder="Type here..."/>
</li>
<li class="login page">
<div class="form">
<h3 class="title">What's your nickname?</h3>
<input class="usernameInput" type="text" maxlength="14" />
</div>
</li>
</ul>

<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
<script src="/main.js"></script>
</body>
</html>
2 changes: 2 additions & 0 deletions studentchat/public/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

module.exports = require('./lib');
Loading