I tried everything I could find, but I can't get my deployment to work. I keep getting 'Application Error', although the app runs on my http://localserver:5000
Seems the problem is in bin/www
Here is the error log i get in Heroku. I suppose the issue is "Port 34037 is already in use"
pp[web.1]: > tubka#0.0.0 start /app
2015-02-04T09:29:03.327577+00:00 app[web.1]: > node ./bin/www
2015-02-04T09:29:03.327578+00:00 app[web.1]:
2015-02-04T09:29:03.695715+00:00 app[web.1]: http server listening on 34037
2015-02-04T09:29:03.761305+00:00 app[web.1]: npm ERR! You can get their info via:
2015-02-04T09:29:03.744365+00:00 app[web.1]: Port 34037 is already in use
2015-02-04T09:29:03.761400+00:00 app[web.1]: npm ERR! npm owner ls tubka
2015-02-04T09:29:03.759922+00:00 app[web.1]: npm ERR! tubka#0.0.0 start: `node ./bin/www`
2015-02-04T09:29:03.761610+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-02-04T09:29:03.760193+00:00 app[web.1]: npm ERR!
2015-02-04T09:29:03.762242+00:00 app[web.1]: npm ERR! command "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-02-04T09:29:03.760053+00:00 app[web.1]: npm ERR! Exit status 1
2015-02-04T09:29:03.762111+00:00 app[web.1]: npm ERR! System Linux 3.13.0-40-generic
2015-02-04T09:29:03.760836+00:00 app[web.1]: npm ERR! This is most likely a problem with the tubka package,
2015-02-04T09:29:03.762374+00:00 app[web.1]: npm ERR! cwd /app
2015-02-04T09:29:03.760300+00:00 app[web.1]: npm ERR! Failed at the tubka#0.0.0 start script.
2015-02-04T09:29:03.762511+00:00 app[web.1]: npm ERR! node -v v0.10.35
2015-02-04T09:29:03.760965+00:00 app[web.1]: npm ERR! not with npm itself.
2015-02-04T09:29:03.762654+00:00 app[web.1]: npm ERR! npm -v 1.4.28
2015-02-04T09:29:03.761073+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-02-04T09:29:03.762777+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-02-04T09:29:03.761194+00:00 app[web.1]: npm ERR! node ./bin/www
2015-02-04T09:29:03.766267+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2015-02-04T09:29:03.766925+00:00 app[web.1]: npm ERR! not ok code 0
2015-02-04T09:29:03.766121+00:00 app[web.1]: npm ERR!
2015-02-04T09:29:03.766678+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2015-02-04T09:29:03.718169+00:00 app[web.1]: websocket server created
2015-02-04T09:29:03.753343+00:00 app[web.1]:
2015-02-04T09:29:04.473160+00:00 heroku[web.1]: Process exited with status 1
2015-02-04T09:29:04.482618+00:00 heroku[web.1]: State changed from starting to crashed
2015-02-04T09:29:59.234120+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=tubka.herokuapp.com request_id=4edf0fd1-1231-440b-ac4a-4a21733e623f fwd="88.192.84.193" dyno= connect= service= status=503 bytes=
2015-02-04T09:30:00.283732+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=tubka.herokuapp.com request_id=3fdcf81e-c40f-4770-ae0f-d83a7e672d1f fwd="88.192.84.193" dyno= connect= service= status=503 bytes=
Internetz:gagtube alexandertazh$
I am following the Heroku docs to deploy websockets with ws module.
Here is part of my app.js Nore the part var port = process.env.PORT || 5000
**var express = require('express')
var http = require("http");
var Crawler = require("simplecrawler");
var cheerio = require('cheerio');
var fs = require('fs');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var app = express();
var port = process.env.PORT || 5000
var server = http.createServer(app)
server.listen(port)
console.log("http server listening on %d", port)
var WebSocketServer = require('ws').Server
var wss = new WebSocketServer({server: server})
console.log("websocket server created")
wss.on("connection", function(ws) {
fs.readFile('./playlist.json', 'utf-8', function(err, data){
if (err) throw err;
ws.send(data);
console.log(data);
});
console.log("websocket connection open")
ws.on("close", function() {
console.log("websocket connection close")
})
})**
And client-side:
var host = location.origin.replace(/^http/, 'ws')
var ws = new WebSocket(host);
ws.onmessage = function (event) {
playthelistclient.push(event.data);
};
My bin/www file part concerning ports:
var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
Hope you guys can help.
Comment out the stuff related to ports in www file, because you already have that stuff in your app.js file:
//var port = normalizePort(process.env.PORT || '3000');
//app.set('port', port);
//server.listen(port);
Related
I would like to thank you guys in advance. so I am having issues opening my express server after I have deployed it on Heroku. The issue is I keep on getting the error below and I hope someone can please help me.
2023-02-06T09:34:31.419072+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2023-02-06T09:34:31.419234+00:00 app[web.1]: npm ERR! errno 1
2023-02-06T09:34:31.419978+00:00 app[web.1]: npm ERR! server#1.0.0 start: node server.js
2023-02-06T09:34:31.420062+00:00 app[web.1]: npm ERR! Exit status 1
2023-02-06T09:34:31.420152+00:00 app[web.1]: npm ERR!
2023-02-06T09:34:31.420229+00:00 app[web.1]: npm ERR! Failed at the server#1.0.0 start script.
2023-02-06T09:34:31.420301+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-02-06T09:34:31.428635+00:00 app[web.1]:
2023-02-06T09:34:31.428714+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2023-02-06T09:34:31.428770+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2023-02-06T09_34_31_420Z-debug.log
2023-02-06T09:34:31.607388+00:00 heroku[web.1]: Process exited with status 1
2023-02-06T09:34:31.670514+00:00 heroku[web.1]: State changed from starting to crashed
2023-02-06T09:34:57.360088+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thewrightlogistic.herokuapp.com request_id=45a256da-ca0f-4af1-86a6-a7fc81112803 fwd="98.174.153.51" dyno= connect= service= status=503 bytes= protocol=https
2023-02-06T09:34:57.360088+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=thewrightlogistic.herokuapp.com request_id=45a256da-ca0f-4af1-86a6-a7fc81112803 fwd="98.174.153.51" dyno= connect= service= status=503 bytes= protocol=https
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser')
const mongoose = require('./database')
const middleware = require('./middleware')
const cors = require('cors')
const app = express();
const contactRouter = require('./routes/contactRoutes');
const authRouter = require('./routes/authRoutes');
const userRouter = require('./routes/userRoutes');
// const dashboardRouter = require('./routes/dashboard');
// view engine setup
app.set('view engine', 'ejs' );
// STATIC FILES
app.use(express.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(express.static('public'));
app.use(cors())
// post contact route
app.use('/auth',authRouter );
app.use('/users',userRouter );
app.use('/contact',contactRouter );
// app.use('/dashboard',dashboardRouter );
// FOR PRODUCTION
app.listen(process.env.PORT || 8080, () => {
console.log(`Listening on port 8080`)
})
My app successfully deployed to Heroku..
****: Deployed 6bc02eb8 Today at 4:19 PM · v23 ·
Compare diff **** ****: Build
succeeded Today at 4:18 PM · View build log
But It shows error when try to open my app...
2022-06-29T10:19:45.228279+00:00 app[web.1]: npm ERR!
2022-06-29T10:19:45.228377+00:00 app[web.1]: npm ERR! Failed at the
blog-application#1.0.0 start script. 2022-06-29T10:19:45.228470+00:00
app[web.1]: npm ERR! This is probably not a problem with npm. There is
likely additional logging output above.
2022-06-29T10:19:45.236802+00:00 app[web.1]:
2022-06-29T10:19:45.237020+00:00 app[web.1]: npm ERR! A complete log
of this run can be found in: 2022-06-29T10:19:45.237112+00:00
app[web.1]: npm ERR!
/app/.npm/_logs/2022-06-29T10_19_45_229Z-debug.log
2022-06-29T10:19:45.431649+00:00 heroku[web.1]: Process exited with
status 1 2022-06-29T10:19:45.541882+00:00 heroku[web.1]: State changed
from starting to crashed 2022-06-29T10:19:48.705353+00:00
heroku[router]: at=error code=H10 desc="App crashed" method=GET
path="/" host=syt-share-your-thoughts.herokuapp.com
request_id=0bb2aaff-6bce-41fb-891e-d3b361a122f8 fwd="59.153.103.22"
dyno= connect= service= status=503 bytes= protocol=https
2022-06-29T10:19:51.151462+00:00 heroku[router]: at=error code=H10
desc="App crashed" method=GET path="/favicon.ico"
host=syt-share-your-thoughts.herokuapp.com
request_id=c0d24108-01a7-44b7-96dd-e8cc62bcaa7c fwd="59.153.103.22"
dyno= connect= service= status=503 bytes= protocol=https
here is my package.json file:
{
"name": "blog-application",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"start": "node app.js",
"dev": "nodemon app.js"
},
"author": "Md Shareful Islam",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"chalk": "^4.1.0",
"cheerio": "^1.0.0-rc.11",
"config": "^3.3.7",
"connect-flash": "^0.1.1",
"connect-mongodb-session": "^3.1.1",
"debug": "^4.3.4",
"dotenv": "^16.0.1",
"ejs": "^3.1.8",
"express": "^4.18.1",
"express-session": "^1.17.3",
"express-validator": "^6.14.1",
"moment": "^2.29.3",
"mongoose": "^6.3.8",
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"nodemon": "^2.0.16",
"reading-time": "^1.5.0",
"validator": "^13.7.0"
},
"engines": {
"node": "14.15.5"
}
}
And this is my main file:
require('dotenv').config()
const express = require('express');
const mongoose = require('mongoose')
const config = require('config')
const chalk = require('chalk')
// import middleware
const setMiddleware = require('./middleware/middleware')
//Import Routes
const setRoutes = require('./routes/routes')
const MONGODB_URI = `mongodb+srv://${config.get('db-admin')}:${config.get('db-password')}#blogapp.ool50gr.mongodb.net/?retryWrites=true&w=majority`
const app = express();
// Setup View Engine
app.set('view engine', 'ejs')
app.set('views', 'views')
// Using Middleware from Middleware Directory
setMiddleware(app)
// Using Routes from Route Directory
setRoutes(app)
// ** middleware to handle 404 and 500.
app.use((req, res, next) => {
let error = new Error('404 Page Not Found');
error.status = 404;
next(error);
})
app.use((error, req, res, next) => {
if(error.status === 404) {
return res.render('pages/error/404', {flashMessage: {}})
}
res.render('pages/error/500', {flashMessage: {}})
})
const PORT = process.env.PORT || 8080;
mongoose.connect(MONGODB_URI,
{useNewUrlParser: true})
.then(() => {
console.log(chalk.green.bold('Database connected!'))
app.listen(PORT, () => {
console.log(chalk.green.italic(`App is running on PORT ${PORT}`));
});
})
.catch(e => {
return console.log(e)
})
Here are logs datails from Heroku...
2022-06-29T16:18:56.404997+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-06-29T16:18:56.405076+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-06-29T16_18_56_398Z-debug.log
2022-06-29T16:18:56.554135+00:00 heroku[web.1]: Process exited with status 1
2022-06-29T16:18:56.637092+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-29T16:18:56.640222+00:00 heroku[web.1]: State changed from crashed to starting
2022-06-29T16:19:00.220649+00:00 heroku[web.1]: Starting process with command `npm start`
2022-06-29T16:19:03.473783+00:00 app[web.1]:
2022-06-29T16:19:03.473792+00:00 app[web.1]: > blog-application#1.0.0 start /app
2022-06-29T16:19:03.473792+00:00 app[web.1]: > node app.js
2022-06-29T16:19:03.473792+00:00 app[web.1]:
2022-06-29T16:19:35.090006+00:00 app[web.1]: /app/node_modules/mongodb/lib/utils.js:417
2022-06-29T16:19:35.090017+00:00 app[web.1]: throw error;
2022-06-29T16:19:35.090018+00:00 app[web.1]: ^
2022-06-29T16:19:35.090019+00:00 app[web.1]:
2022-06-29T16:19:35.090020+00:00 app[web.1]: Error: Error connecting to db: connection <monitor> to 13.250.175.230:27017 closed
2022-06-29T16:19:35.090021+00:00 app[web.1]: at /app/node_modules/connect-mongodb-session/index.js:88:17
2022-06-29T16:19:35.090021+00:00 app[web.1]: at /app/node_modules/mongodb/lib/utils.js:413:17
2022-06-29T16:19:35.090022+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongo_client.js:129:28
2022-06-29T16:19:35.090022+00:00 app[web.1]: at connectCallback (/app/node_modules/mongodb/lib/operations/connect.js:29:9)
2022-06-29T16:19:35.090023+00:00 app[web.1]: at /app/node_modules/mongodb/lib/operations/connect.js:78:20
2022-06-29T16:19:35.090023+00:00 app[web.1]: at Object.callback (/app/node_modules/mongodb/lib/sdam/topology.js:208:50)
2022-06-29T16:19:35.090024+00:00 app[web.1]: at Timeout._onTimeout (/app/node_modules/mongodb/lib/sdam/topology.js:319:33)
2022-06-29T16:19:35.090024+00:00 app[web.1]: at listOnTimeout (internal/timers.js:554:17)
2022-06-29T16:19:35.090024+00:00 app[web.1]: at processTimers (internal/timers.js:497:7)
2022-06-29T16:19:35.109275+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2022-06-29T16:19:35.109568+00:00 app[web.1]: npm ERR! errno 1
2022-06-29T16:19:35.113501+00:00 app[web.1]: npm ERR! blog-application#1.0.0 start: `node app.js`
2022-06-29T16:19:35.113599+00:00 app[web.1]: npm ERR! Exit status 1
2022-06-29T16:19:35.113705+00:00 app[web.1]: npm ERR!
2022-06-29T16:19:35.113792+00:00 app[web.1]: npm ERR! Failed at the blog-application#1.0.0 start script.
2022-06-29T16:19:35.113876+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2022-06-29T16:19:35.120692+00:00 app[web.1]:
2022-06-29T16:19:35.120808+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2022-06-29T16:19:35.120859+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2022-06-29T16_19_35_114Z-debug.log
2022-06-29T16:19:35.785417+00:00 heroku[web.1]: State changed from starting to crashed
2022-06-29T16:19:35.273101+00:00 heroku[web.1]: Process exited with status 1
2022-06-29T16:19:38.894464+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=syt-share-your-thoughts.herokuapp.com request_id=2b13bcd5-e764-4e60-a254-394a8b0f7531 fwd="59.153.103.22" dyno= connect= service= status=503 bytes= protocol=https
2022-06-29T16:19:41.185482+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=syt-share-your-thoughts.herokuapp.com request_id=6109b89a-818d-4827-804b-98c1a875a3ab fwd="59.153.103.22" dyno= connect= service= status=503 bytes= protocol=https
you don't provide enought information for us to be able to help you, nobody can or will debug it for you in that regard.
Here, sharing your package.json and the entry file of your application would be useful!
Anyway it seems that npm run start is crashing, you could start by making sure that whatever command is run by npm run start is accessible in heroku (You might use a global dependencies that you have installed on your local machine which heroku doesn't).
I'll be glad to help you more if you provide required code snippets for us to understand what's happening!
i'm deploying my first app on heroku, i pushed the code on GitHub, add Heroku keys(because ), created the heroku app on terminal and finally git push heroku master.
The app is very basic, but it doesn't work, and i can't even find a decent log information to work with!
This is the long log that i found.
Hope someone could help me!
2019-12-06T00:11:00.862870+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
2019-12-06T00:11:00.862872+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2019-12-06T00:11:00.862874+00:00 app[web.1]: requireStack: [ '/app/src/app.js' ]
2019-12-06T00:11:00.862876+00:00 app[web.1]: }
2019-12-06T00:11:00.870032+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-12-06T00:11:00.871330+00:00 app[web.1]: npm ERR! errno 1
2019-12-06T00:11:00.871733+00:00 app[web.1]: npm ERR! 1-Heroku#1.0.0 start: `node src/app.js`
2019-12-06T00:11:00.872684+00:00 app[web.1]: npm ERR! Exit status 1
2019-12-06T00:11:00.872690+00:00 app[web.1]: npm ERR!
2019-12-06T00:11:00.872695+00:00 app[web.1]: npm ERR! Failed at the 1-Heroku#1.0.0 start script.
2019-12-06T00:11:00.872698+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-12-06T00:11:02.538864+00:00 app[web.1]:
2019-12-06T00:11:02.542433+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-12-06T00:11:02.542703+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-12-06T00_11_00_875Z-debug.log
2019-12-06T00:11:02.625046+00:00 heroku[web.1]: State changed from starting to crashed
2019-12-06T00:11:02.614891+00:00 heroku[web.1]: Process exited with status 1
2019-12-06T00:18:05.000000+00:00 app[api]: Build started by user cristiano.piscioneri.dev#gmail.com
2019-12-06T00:18:24.105108+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=c-neri-heroku.herokuapp.com request_id=b779201e-bb33-420a-9aea-cd67d026040e fwd="151.32.4.219" dyno= connect= service= status=503 bytes= protocol=https
2019-12-06T00:18:48.614900+00:00 app[api]: Deploy c57e0dc3 by user cristiano.piscioneri.dev#gmail.com
2019-12-06T00:18:48.614900+00:00 app[api]: Release v4 created by user cristiano.piscioneri.dev#gmail.com
2019-12-06T00:18:48.892841+00:00 heroku[web.1]: State changed from crashed to starting
2019-12-06T00:18:49.000000+00:00 app[api]: Build succeeded
2019-12-06T00:18:52.277413+00:00 heroku[web.1]: Starting process with command `npm start`
2019-12-06T00:18:55.506035+00:00 app[web.1]:
2019-12-06T00:18:55.506063+00:00 app[web.1]: > 1-Heroku#1.0.0 start /app
2019-12-06T00:18:55.506065+00:00 app[web.1]: > node src/app.js
2019-12-06T00:18:55.506067+00:00 app[web.1]:
2019-12-06T00:18:55.809888+00:00 app[web.1]: internal/modules/cjs/loader.js:800
2019-12-06T00:18:55.809932+00:00 app[web.1]: throw err;
2019-12-06T00:18:55.809934+00:00 app[web.1]: ^
2019-12-06T00:18:55.809936+00:00 app[web.1]:
2019-12-06T00:18:55.809939+00:00 app[web.1]: Error: Cannot find module 'hbs'
2019-12-06T00:18:55.809941+00:00 app[web.1]: Require stack:
2019-12-06T00:18:55.809943+00:00 app[web.1]: - /app/src/app.js
2019-12-06T00:18:55.809945+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
2019-12-06T00:18:55.809947+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:690:27)
2019-12-06T00:18:55.809950+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:852:19)
2019-12-06T00:18:55.809952+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:74:18)
2019-12-06T00:18:55.809954+00:00 app[web.1]: at Object.<anonymous> (/app/src/app.js:5:13)
2019-12-06T00:18:55.809956+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:959:30)
2019-12-06T00:18:55.809958+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
2019-12-06T00:18:55.809960+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:815:32)
2019-12-06T00:18:55.809962+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:727:14)
2019-12-06T00:18:55.809964+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
2019-12-06T00:18:55.809966+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2019-12-06T00:18:55.809968+00:00 app[web.1]: requireStack: [ '/app/src/app.js' ]
2019-12-06T00:18:55.809970+00:00 app[web.1]: }
2019-12-06T00:18:55.853916+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-12-06T00:18:55.854597+00:00 app[web.1]: npm ERR! errno 1
2019-12-06T00:18:55.858952+00:00 app[web.1]: npm ERR! 1-Heroku#1.0.0 start: `node src/app.js`
2019-12-06T00:18:55.859163+00:00 app[web.1]: npm ERR! Exit status 1
2019-12-06T00:18:55.859694+00:00 app[web.1]: npm ERR!
2019-12-06T00:18:55.859697+00:00 app[web.1]: npm ERR! Failed at the 1-Heroku#1.0.0 start script.
2019-12-06T00:18:55.859764+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-12-06T00:18:55.917128+00:00 app[web.1]:
2019-12-06T00:18:55.917132+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-12-06T00:18:55.917135+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-12-06T00_18_55_860Z-debug.log
2019-12-06T00:18:56.015418+00:00 heroku[web.1]: State changed from starting to crashed
2019-12-06T00:18:55.990556+00:00 heroku[web.1]: Process exited with status 1
2019-12-06T00:18:57.272264+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=c-neri-heroku.herokuapp.com request_id=1371d608-aa3d-4ada-94bb-cde5f9edfd69 fwd="151.32.4.219" dyno= connect= service= status=503 bytes= protocol=https
2019-12-06T00:21:46.461037+00:00 heroku[web.1]: State changed from crashed to starting
2019-12-06T00:21:49.272673+00:00 heroku[web.1]: Starting process with command `npm start`
2019-12-06T00:21:53.501754+00:00 heroku[web.1]: State changed from starting to crashed
2019-12-06T00:21:53.116284+00:00 app[web.1]:
2019-12-06T00:21:53.116306+00:00 app[web.1]: > 1-Heroku#1.0.0 start /app
2019-12-06T00:21:53.116308+00:00 app[web.1]: > node src/app.js
2019-12-06T00:21:53.116310+00:00 app[web.1]:
2019-12-06T00:21:53.306576+00:00 app[web.1]: internal/modules/cjs/loader.js:800
2019-12-06T00:21:53.306580+00:00 app[web.1]: throw err;
2019-12-06T00:21:53.306583+00:00 app[web.1]: ^
2019-12-06T00:21:53.306586+00:00 app[web.1]:
2019-12-06T00:21:53.306588+00:00 app[web.1]: Error: Cannot find module 'hbs'
2019-12-06T00:21:53.306591+00:00 app[web.1]: Require stack:
2019-12-06T00:21:53.306596+00:00 app[web.1]: - /app/src/app.js
2019-12-06T00:21:53.306598+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
2019-12-06T00:21:53.306600+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:690:27)
2019-12-06T00:21:53.306603+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:852:19)
2019-12-06T00:21:53.306605+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:74:18)
2019-12-06T00:21:53.306607+00:00 app[web.1]: at Object.<anonymous> (/app/src/app.js:5:13)
2019-12-06T00:21:53.306609+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:959:30)
2019-12-06T00:21:53.306611+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
2019-12-06T00:21:53.306613+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:815:32)
2019-12-06T00:21:53.306616+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:727:14)
2019-12-06T00:21:53.306618+00:00 app[web.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) {
2019-12-06T00:21:53.306620+00:00 app[web.1]: code: 'MODULE_NOT_FOUND',
2019-12-06T00:21:53.306622+00:00 app[web.1]: requireStack: [ '/app/src/app.js' ]
2019-12-06T00:21:53.306624+00:00 app[web.1]: }
2019-12-06T00:21:53.321267+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-12-06T00:21:53.321742+00:00 app[web.1]: npm ERR! errno 1
2019-12-06T00:21:53.324564+00:00 app[web.1]: npm ERR! 1-Heroku#1.0.0 start: `node src/app.js`
2019-12-06T00:21:53.324972+00:00 app[web.1]: npm ERR! Exit status 1
2019-12-06T00:21:53.325528+00:00 app[web.1]: npm ERR!
2019-12-06T00:21:53.326031+00:00 app[web.1]: npm ERR! Failed at the 1-Heroku#1.0.0 start script.
2019-12-06T00:21:53.326436+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-12-06T00:21:53.342561+00:00 app[web.1]:
2019-12-06T00:21:53.342869+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-12-06T00:21:53.343077+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-12-06T00_21_53_327Z-debug.log
2019-12-06T00:21:53.479134+00:00 heroku[web.1]: Process exited with status 1
2019-12-06T00:22:24.106302+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=c-neri-heroku.herokuapp.com request_id=fbd6f731-b6f7-49c1-b1ed-2373fd79d7d1 fwd="151.32.4.219" dyno= connect= service= status=503 bytes= protocol=https
2019-12-06T00:31:08.844509+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=c-neri-heroku.herokuapp.com request_id=f109e557-116b-4915-8c50-82520f635a42 fwd="151.32.4.219" dyno= connect= service= status=503 bytes= protocol=https
my app.js
const express = require('express')
const path = require('path')
const app = express()
const appRoute = require('./routes/app.js')
const hbs = require( 'hbs')
const port = process.env.PORT||3001
const publicPath = path.join(__dirname + '../../public')
const partialsPath = path.join(__dirname + '/template/partials')
const viewPath = path.join(__dirname + '/template/views')
//HBS
app.set('view engine', 'hbs')
app.set('views', viewPath)
hbs.registerPartials(partialsPath)
app.use(express.static(publicPath))
//ROUTES
app.use(appRoute)
app.listen(port)
my package.js script
"scripts": {
"build": "webpack",
"watch": "webpack --watch",
"dev": "nodemon src/app.js",
"start": "node src/app.js"
},
I have installed Parse Server on Heroku and forked the Parse Server Example. When I git push heroku master I get the error
"You must provide an appIp!"
Error log:
019-03-20T11:03:56.517489+00:00 heroku[web.1]: Starting process with command `npm start`
2019-03-20T11:03:59.418738+00:00 app[web.1]:
2019-03-20T11:03:59.418754+00:00 app[web.1]: > parse-server-example#1.4.0 start /app
2019-03-20T11:03:59.418756+00:00 app[web.1]: > node index.js
2019-03-20T11:03:59.418757+00:00 app[web.1]:
2019-03-20T11:04:01.887096+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-20T11:04:01.724008+00:00 app[web.1]:
2019-03-20T11:04:01.724030+00:00 app[web.1]: /app/node_modules/parse-server/lib/ParseServer.js:218
2019-03-20T11:04:01.724032+00:00 app[web.1]: throw err;
2019-03-20T11:04:01.724033+00:00 app[web.1]: ^
2019-03-20T11:04:01.724105+00:00 app[web.1]: You must provide an appId!
2019-03-20T11:04:01.779713+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-03-20T11:04:01.780520+00:00 app[web.1]: npm ERR! errno 7
2019-03-20T11:04:01.782955+00:00 app[web.1]: npm ERR! parse-server-example#1.4.0 start: `node index.js`
2019-03-20T11:04:01.783173+00:00 app[web.1]: npm ERR! Exit status 7
2019-03-20T11:04:01.783716+00:00 app[web.1]: npm ERR!
2019-03-20T11:04:01.783983+00:00 app[web.1]: npm ERR! Failed at the parse-server-example#1.4.0 start script.
2019-03-20T11:04:01.784194+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-03-20T11:04:01.804701+00:00 app[web.1]:
2019-03-20T11:04:01.805007+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-03-20T11:04:01.805196+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2019-03-20T11_04_01_786Z-debug.log
2019-03-20T11:04:01.866235+00:00 heroku[web.1]: Process exited with status 7
index.js:
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var path = require('path');
var databaseUri = process.env.DATABASE_URI || process.env.MONGODB_URI;
if (!databaseUri) {
console.log('DATABASE_URI not specified, falling back to localhost.');
}
var api = new ParseServer({
databaseURI: databaseUri || 'mongodb://key
cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
appId: process.env.APP_ID || 'myAppId',
masterKey: process.env.MASTER_KEY || 'myMasterKey',
serverURL: process.env.SERVER_URL || 'http://myApp.herokuapp.com/parse',
liveQuery: {
classNames: ["Posts", "Comments"] // List of classes to support for query subscriptions
}
});
var server = ParseServer({
verifyUserEmails: true,
publicServerURL: 'myApp.herokuapp.com/parse',
appName: 'myAppName',
emailAdapter: {
module: 'parse-server-simple-mailgun-adapter',
options: {
fromAddress: 'parse#example.com',
domain: 'domainFromMailGun.mailgun.org',
apiKey: 'myAPIKey',
}
}
});
I have provided the appId in appId: process.env.APP_ID || 'myAppId', or am I missing something here? Does the appId have to provided elsewhere?
First of all, please invalidate those MongoDB credentials immediately. They are forever compromised, and you need to generate new ones. Editing them out of your question is not enough.
I'm not totally clear on what you're trying to do here, but you're actually instantiating two Parse servers. You do provide an appId for the first one (api), but not for the second (server).
You probably only need one Parse Server. If you do actually need two for some reason, each one will need an appId.
I wrote a simple NodeJs web app using React. I use Socket.io in this app to connect client to the server. The following codes are for my server.js and the component which connects to the server :
Server.js :
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var index = require('./routes/index');
var socket = require('./common/socket');
var exphbs = require('express-handlebars');
var app = express();
require('node-jsx').install();
var port = process.env.PORT || 9091;
var io = require('socket.io').listen(app.listen(port, function(){
console.log('Server is listening on port: ' + port);
}));
io.sockets.on('connection', function(sock){
socket(sock , io);
});
io.configure(function () {
io.set("transports", ["xhr-polling"]);
io.set("polling duration", 10);
});
// view engine setup
app.engine('handlebars', exphbs({defaultLayout: 'main', extname: '.handlebars'}));
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'handlebars');
// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use('/', index);
// catch 404 and forward to error handler
app.use(function(req, res, next) {
var err = new Error('Not Found');
err.status = 404;
next(err);
});
// error handlers
// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
app.use(function(err, req, res, next) {
res.status(err.status || 500);
console.log(err.message);
res.render('error', {
message: err.message,
error: err
});
});
}
// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
res.status(err.status || 500);
res.render('error', {
message: err.message,
error: {}
});
});
module.exports = app;
Component.js :
'use strict';
var React = require('react');
var io = require('socket.io-client');
var socket;
var UserRow = require('./userRow');
var SimpleUserList = React.createClass({
displayName: 'SimpleUserList',
componentDidMount: function() {
socket = io.connect();
socket.on('userList', function(data) {
console.log('userlist received');
}.bind(this));
},
componentWillUnmount: function() {
socket.close();
},
render: function() {
return (<div></div>);
}
module.exports = SimpleUserList;
main.handlebars :
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/style.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>
<body>
{{{ body }}}
<script src="https://cdn.socket.io/socket.io-1.0.0.js"></script>
<script src="javascripts/bundle.js"></script>
</body>
</html>
The handle bar is not important, I just wanted to show what script file I include in my html file.
Any idea why I cannot connect to the heroku server?
heroku log :
2015-07-29T10:59:30.153481+00:00 app[web.1]: > npm run-script build | node server.js
2015-07-29T10:59:30.153482+00:00 app[web.1]:
2015-07-29T10:59:39.356552+00:00 app[web.1]: /app/server.js:22
2015-07-29T10:59:39.356556+00:00 app[web.1]: io.configure(function () {
2015-07-29T10:59:39.356558+00:00 app[web.1]: ^
2015-07-29T10:59:39.356560+00:00 app[web.1]: TypeError: undefined is not a function
2015-07-29T10:59:39.356561+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:22:4)
2015-07-29T10:59:39.356565+00:00 app[web.1]: at Object.Module._extensions..js (module.js:478:10)
2015-07-29T10:59:39.356590+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-07-29T10:59:39.356595+00:00 app[web.1]: at startup (node.js:129:16)
2015-07-29T10:59:39.356563+00:00 app[web.1]: at Module._compile (module.js:460:26)
2015-07-29T10:59:39.356593+00:00 app[web.1]: at Function.Module.runMain (module.js:501:10)
2015-07-29T10:59:39.356596+00:00 app[web.1]: at node.js:814:3
2015-07-29T10:59:39.356592+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-07-29T10:59:44.937645+00:00 app[web.1]: npm ERR! Linux 3.13.0-49-generic
2015-07-29T10:59:44.817354+00:00 app[web.1]: util.print: Use console.log instead
2015-07-29T10:59:44.932214+00:00 app[web.1]:
2015-07-29T10:59:44.938157+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-07-29T10:59:44.938399+00:00 app[web.1]: npm ERR! node v0.12.7
2015-07-29T10:59:44.938826+00:00 app[web.1]: npm ERR! npm v2.11.3
2015-07-29T10:59:44.939022+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-07-29T10:59:44.939233+00:00 app[web.1]: npm ERR! simple-user-list#0.0.0 start: `npm run-script build | node server.js `
2015-07-29T10:59:44.939499+00:00 app[web.1]: npm ERR! Exit status 1
2015-07-29T10:59:44.939661+00:00 app[web.1]: npm ERR!
2015-07-29T10:59:44.939844+00:00 app[web.1]: npm ERR! Failed at the simple-user-list#0.0.0 start script 'npm run-script build | node server.js '.
2015-07-29T10:59:44.940270+00:00 app[web.1]: npm ERR! This is most likely a problem with the simple-user-list package,
2015-07-29T10:59:44.940497+00:00 app[web.1]: npm ERR! not with npm itself.
2015-07-29T10:59:44.940649+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-07-29T10:59:44.940834+00:00 app[web.1]: npm ERR! npm run-script build | node server.js
2015-07-29T10:59:44.940988+00:00 app[web.1]: npm ERR! You can get their info via:
2015-07-29T10:59:44.941492+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-07-29T10:59:44.944584+00:00 app[web.1]:
2015-07-29T10:59:44.941149+00:00 app[web.1]: npm ERR! npm owner ls simple-user-list
2015-07-29T10:59:44.944830+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-07-29T10:59:44.944952+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2015-07-29T10:59:45.817817+00:00 heroku[web.1]: Process exited with status 1
2015-07-29T10:59:45.831953+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-29T10:59:47.593870+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=bd0cf3d6-0b8b-4fc0-aa37-a940cd5f328f fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T10:59:57.607136+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=8f80ec43-0eb8-4375-9341-7c1c2ecb81f0 fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T11:00:07.626517+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=4ee95d7b-e757-4590-b9e9-f48f491a3654 fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T11:00:17.650806+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=bdebebe0-6b5b-444b-81f2-fb34d3b00bb4 fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T11:00:27.660163+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=289949c3-1dac-4f3c-bb89-f6093da2c997 fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T11:00:37.669828+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=997d267f-81fb-40e4-9c7d-85f9803653f8 fwd="50.19.169.132" dyno= connect= service= status=503 bytes=
2015-07-29T11:06:28.718078+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=simple-user-list.herokuapp.com request_id=c0f10a34-914a-439b-8a59-5ef954d994e8 fwd="207.6.39.42" dyno= connect= service= status=503 bytes=
2015-07-29T11:10:46.273821+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-29T11:10:49.577787+00:00 heroku[web.1]: Starting process with command `npm start`
2015-07-29T11:10:51.591809+00:00 app[web.1]:
2015-07-29T11:10:51.591830+00:00 app[web.1]: > simple-user-list#0.0.0 start /app
2015-07-29T11:10:51.591832+00:00 app[web.1]: > npm run-script build | node server.js
2015-07-29T11:10:51.591833+00:00 app[web.1]:
2015-07-29T11:10:57.340680+00:00 app[web.1]: /app/server.js:22
2015-07-29T11:10:57.340683+00:00 app[web.1]: io.configure(function () {
2015-07-29T11:10:57.340685+00:00 app[web.1]: ^
2015-07-29T11:10:57.340687+00:00 app[web.1]: TypeError: undefined is not a function
2015-07-29T11:10:57.340689+00:00 app[web.1]: at Object.<anonymous> (/app/server.js:22:4)
2015-07-29T11:10:57.340692+00:00 app[web.1]: at Object.Module._extensions..js (module.js:478:10)
2015-07-29T11:10:57.340693+00:00 app[web.1]: at Module.load (module.js:355:32)
2015-07-29T11:10:57.340690+00:00 app[web.1]: at Module._compile (module.js:460:26)
2015-07-29T11:10:57.340695+00:00 app[web.1]: at Function.Module._load (module.js:310:12)
2015-07-29T11:10:57.340696+00:00 app[web.1]: at Function.Module.runMain (module.js:501:10)
2015-07-29T11:10:57.340697+00:00 app[web.1]: at startup (node.js:129:16)
2015-07-29T11:10:57.340699+00:00 app[web.1]: at node.js:814:3
2015-07-29T11:11:02.957215+00:00 app[web.1]: util.print: Use console.log instead
2015-07-29T11:11:03.080961+00:00 app[web.1]: npm ERR! Linux 3.13.0-57-generic
2015-07-29T11:11:03.088435+00:00 app[web.1]: npm ERR! Please include the following file with any support request:
2015-07-29T11:11:03.088566+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2015-07-29T11:11:03.074299+00:00 app[web.1]:
2015-07-29T11:11:03.081974+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2015-07-29T11:11:03.082248+00:00 app[web.1]: npm ERR! node v0.12.7
2015-07-29T11:11:03.082698+00:00 app[web.1]: npm ERR! npm v2.11.3
2015-07-29T11:11:03.082883+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2015-07-29T11:11:03.083205+00:00 app[web.1]: npm ERR! simple-user-list#0.0.0 start: `npm run-script build | node server.js `
2015-07-29T11:11:03.083354+00:00 app[web.1]: npm ERR! Exit status 1
2015-07-29T11:11:03.083515+00:00 app[web.1]: npm ERR!
2015-07-29T11:11:03.083669+00:00 app[web.1]: npm ERR! Failed at the simple-user-list#0.0.0 start script 'npm run-script build | node server.js '.
2015-07-29T11:11:03.084247+00:00 app[web.1]: npm ERR! not with npm itself.
2015-07-29T11:11:03.084376+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2015-07-29T11:11:03.083969+00:00 app[web.1]: npm ERR! This is most likely a problem with the simple-user-list package,
2015-07-29T11:11:03.085055+00:00 app[web.1]: npm ERR! You can get their info via:
2015-07-29T11:11:03.084565+00:00 app[web.1]: npm ERR! npm run-script build | node server.js
2015-07-29T11:11:03.085058+00:00 app[web.1]: npm ERR! npm owner ls simple-user-list
2015-07-29T11:11:03.085128+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2015-07-29T11:11:03.088091+00:00 app[web.1]:
2015-07-29T11:11:03.853402+00:00 heroku[web.1]: Process exited with status 1
2015-07-29T11:11:03.866414+00:00 heroku[web.1]: State changed from starting to crashed
2015-07-29T11:16:15.196180+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-29T11:16:15.196195+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-29T11:16:15.153339+00:00 heroku[api]: Deploy a6fb15c by aryan.hosseinzadeh#gmail.com
2015-07-29T11:16:15.153339+00:00 heroku[api]: Release v15 created by aryan.hosseinzadeh#gmail.com
2015-07-29T11:16:15.571381+00:00 heroku[web.1]: State changed from crashed to starting
2015-07-29T11:16:19.908038+00:00 heroku[web.1]: Starting process with command `npm start`
2015-07-29T11:16:22.344144+00:00 app[web.1]:
2015-07-29T11:16:22.344166+00:00 app[web.1]: > simple-user-list#0.0.0 start /app
2015-07-29T11:16:22.344168+00:00 app[web.1]: > npm run-script build | node server.js
2015-07-29T11:16:22.344170+00:00 app[web.1]:
2015-07-29T11:16:28.997464+00:00 app[web.1]: Option polling duration is not valid. Please refer to the README.
2015-07-29T11:16:29.378774+00:00 heroku[web.1]: State changed from starting to up
2015-07-29T11:16:29.671752+00:00 app[web.1]: Server is listening on port: 9807
2015-07-29T11:16:30.880399+00:00 heroku[router]: at=info method=GET path="/" host=simple-user-list.herokuapp.com request_id=8286e365-9790-487e-9b71-a69a4de800fc fwd="54.144.80.213" dyno=web.1 connect=6ms service=227ms status=200 bytes=2017
2015-07-29T11:16:30.910262+00:00 app[web.1]: GET / 200 252.009 ms - 1821
2015-07-29T11:16:34.120554+00:00 app[web.1]: util.print: Use console.log instead
So , it's solved.
There was no need to explicitly refer to {host}/socket/socket.io and there was no need to specify io.config (at least so far) and also there was no need to specify host address on client side (io.connect is good enough).