marmelab/ng-admin-demo

install on new Ubuntu instance

davereinhart opened this issue · 4 comments

I'm trying to get this installed on a new Ubuntu instance, but I'm not getting any response from http://localhost:8080. Here are the commands I am running on a new Ubuntu instance. Am I missing a step?

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install npm
npm install bower -g
sudo apt-get install git
git clone https://github.com/marmelab/ng-admin-demo.git
cd ng-admin-demo
make install
make data
make run

Here's the final output of the last command.
ubuntu@ip-172-31-24-238:~/ng-admin-demo$ make run


  • open http://localhost:8080/webpack-dev-server/ *
    70% 1/1 build moduleshttp://localhost:8080/
    webpack result is served from /build
    content is served from /home/ubuntu/ng-admin-demo
    Hash: 575f260f93ebaaa25fd3
    Version: webpack 1.12.14
    Time: 3974ms
    Asset Size Chunks Chunk Names
    main.js 2.32 MB 0 [emitted] main
    main.css 1.55 MB 0 [emitted] main
    chunk {0} main.js, main.css (main) 838 kB [rendered]
    [0] multi main 64 bytes {0} [built]
    1-dev-server/client?http://localhost:8080 2.67 kB {0} [built]
    2//node-libs-browser//url/url.js 22.3 kB {0} [built]
    3//node-libs-browser//url//punycode/punycode.js 14.6 kB {0} [built]
    4/buildin/module.js 251 bytes {0} [built]
    5/
    /node-libs-browser//url//querystring/index.js 127 bytes {0} [built]
    6//node-libs-browser//url//querystring/decode.js 2.4 kB {0} [built]
    7/
    /node-libs-browser//url//querystring/encode.js 2.09 kB {0} [built]
    8-dev-server//sockjs-client/lib/entry.js 244 bytes {0} [built]
    9-dev-server/
    /sockjs-client/lib/transport-list.js 613 bytes {0} [built]
    10-dev-server//sockjs-client/lib/transport/websocket.js 2.68 kB {0} [built]
    11/
    /node-libs-browser//process/browser.js 2.06 kB {0} [built]
    12-dev-server/
    /sockjs-client/lib/utils/event.js 2 kB {0} [built]
    13-dev-server//sockjs-client/lib/utils/random.js 746 bytes {0} [built]
    14-dev-server/
    /sockjs-client/lib/utils/browser-crypto.js 438 bytes {0} [built]
    15-dev-server//sockjs-client/lib/utils/url.js 975 bytes {0} [built]
    16-dev-server/
    /sockjs-client//url-parse/index.js 6.55 kB {0} [built]
    17-dev-server/
    /sockjs-client//url-parse//requires-port/index.js 753 bytes {0} [built]
    18-dev-server//sockjs-client//url-parse/lolcation.js 1.4 kB {0} [built]
    19-dev-server//sockjs-client//url-parse//querystringify/index.js 1.3 kB {0} [built]
    20-dev-server/
    /sockjs-client//debug/browser.js 3.76 kB {0} [built]
    21-dev-server/
    /sockjs-client//debug/debug.js 4.1 kB {0} [built]
    22-dev-server/
    /sockjs-client//debug//ms/index.js 2.33 kB {0} [built]
    23-dev-server//sockjs-client//inherits/inherits_browser.js 672 bytes {0} [built]
    24-dev-server//sockjs-client/lib/event/emitter.js 1.11 kB {0} [built]
    25-dev-server/
    /sockjs-client/lib/event/eventtarget.js 1.75 kB {0} [built]
    26-dev-server//sockjs-client/lib/transport/browser/websocket.js 58 bytes {0} [built]
    27-dev-server/
    /sockjs-client/lib/transport/xhr-streaming.js 1.25 kB {0} [built]
    28-dev-server//sockjs-client/lib/transport/lib/ajax-based.js 1.31 kB {0} [built]
    29-dev-server/
    /sockjs-client/lib/transport/lib/sender-receiver.js 1.15 kB {0} [built]
    30-dev-server//sockjs-client/lib/transport/lib/buffered-sender.js 2.3 kB {0} [built]
    31-dev-server/
    /sockjs-client/lib/transport/lib/polling.js 1.32 kB {0} [built]
    32-dev-server//sockjs-client/lib/transport/receiver/xhr.js 1.58 kB {0} [built]
    33-dev-server/
    /sockjs-client/lib/transport/sender/xhr-cors.js 343 bytes {0} [built]
    34-dev-server//sockjs-client/lib/transport/browser/abstract-xhr.js 4.67 kB {0} [built]
    35-dev-server/
    /sockjs-client/lib/transport/sender/xhr-local.js 352 bytes {0} [built]
    36-dev-server//sockjs-client/lib/utils/browser.js 560 bytes {0} [built]
    37-dev-server/
    /sockjs-client/lib/transport/xdr-streaming.js 984 bytes {0} [built]
    38-dev-server//sockjs-client/lib/transport/sender/xdr.js 2.42 kB {0} [built]
    39-dev-server/
    /sockjs-client/lib/transport/eventsource.js 766 bytes {0} [built]
    40-dev-server//sockjs-client/lib/transport/receiver/eventsource.js 1.58 kB {0} [built]
    41-dev-server/
    /sockjs-client/lib/transport/browser/eventsource.js 37 bytes {0} [built]
    42-dev-server//sockjs-client/lib/transport/lib/iframe-wrap.js 981 bytes {0} [built]
    43-dev-server/
    /sockjs-client/lib/transport/iframe.js 3.8 kB {0} [built]
    44-dev-server//sockjs-client//json3/lib/json3.js 43.3 kB {0} [built]
    45/buildin/amd-options.js 43 bytes {0} [built]
    46-dev-server//sockjs-client/lib/version.js 25 bytes {0} [built]
    47-dev-server/
    /sockjs-client/lib/utils/iframe.js 4.95 kB {0} [built]
    48-dev-server//sockjs-client/lib/utils/object.js 532 bytes {0} [built]
    49-dev-server/
    /sockjs-client/lib/transport/htmlfile.js 710 bytes {0} [built]
    50-dev-server//sockjs-client/lib/transport/receiver/htmlfile.js 2.17 kB {0} [built]
    51-dev-server/
    /sockjs-client/lib/transport/xhr-polling.js 894 bytes {0} [built]
    52-dev-server//sockjs-client/lib/transport/xdr-polling.js 712 bytes {0} [built]
    53-dev-server/
    /sockjs-client/lib/transport/jsonp-polling.js 1.02 kB {0} [built]
    54-dev-server//sockjs-client/lib/transport/receiver/jsonp.js 5.49 kB {0} [built]
    55-dev-server/
    /sockjs-client/lib/transport/sender/jsonp.js 2.46 kB {0} [built]
    56-dev-server//sockjs-client/lib/main.js 11.9 kB {0} [built]
    57-dev-server/
    /sockjs-client/lib/shims.js 18.2 kB {0} [built]
    58-dev-server//sockjs-client/lib/utils/escape.js 2.31 kB {0} [built]
    59-dev-server/
    /sockjs-client/lib/utils/transport.js 1.35 kB {0} [built]
    60-dev-server//sockjs-client/lib/utils/log.js 386 bytes {0} [built]
    61-dev-server/
    /sockjs-client/lib/event/event.js 485 bytes {0} [built]
    62-dev-server//sockjs-client/lib/location.js 177 bytes {0} [built]
    63-dev-server/
    /sockjs-client/lib/event/close.js 295 bytes {0} [built]
    64-dev-server//sockjs-client/lib/event/trans-message.js 292 bytes {0} [built]
    65-dev-server/
    /sockjs-client/lib/info-receiver.js 2.22 kB {0} [built]
    66-dev-server//sockjs-client/lib/transport/sender/xhr-fake.js 456 bytes {0} [built]
    67-dev-server/
    /sockjs-client/lib/info-iframe.js 1.52 kB {0} [built]
    68-dev-server//sockjs-client/lib/info-iframe-receiver.js 791 bytes {0} [built]
    69-dev-server/
    /sockjs-client/lib/info-ajax.js 1.03 kB {0} [built]
    70-dev-server//sockjs-client/lib/iframe-bootstrap.js 2.9 kB {0} [built]
    71-dev-server/
    /sockjs-client/lib/facade.js 723 bytes {0} [built]
    72-dev-server//strip-ansi/index.js 161 bytes {0} [built]
    73-dev-server/
    /strip-ansi//ansi-regex/index.js 135 bytes {0} [built]
    74/hot/dev-server.js 1.85 kB {0} [built]
    75/hot/log-apply-result.js 813 bytes {0} [built]
    [76] ./js/main.js 2.46 kB {0} [built]
    [77] ./js/api.js 642 bytes {0} [built]
    [78] ./
    /fakerest/dist/FakeRest.min.js 25.5 kB {0} [built]
    [79] .//sinon/lib/sinon/util/fake_server.js 7.8 kB {0} [built]
    [80] ./
    /sinon/lib/sinon/util/core.js 12.7 kB {0} [built]
    [81] .//sinon/lib/sinon/util/fake_xdomain_request.js 7.07 kB {0} [built]
    [82] ./
    /sinon/lib/sinon/extend.js 2.83 kB {0} [built]
    [83] .//sinon/lib/sinon/util/event.js 3.25 kB {0} [built]
    [84] ./
    /sinon/lib/sinon/log_error.js 1.36 kB {0} [built]
    [85] .//sinon/lib/sinon/util/fake_xml_http_request.js 21.4 kB {0} [built]
    [86] ./
    /sinon/lib/sinon/format.js 1.89 kB {0} [built]
    [87] .//sinon//util/util.js 15.6 kB {0} [optional] [built]
    [88] .//sinon//util/support/isBufferBrowser.js 203 bytes {0} [built]
    [89] .//sinon//util//inherits/inherits_browser.js 672 bytes {0} [built]
    [90] ./
    /sinon//formatio/lib/formatio.js 6.74 kB {0} [optional] [built]
    [91] ./
    /sinon//samsam/lib/samsam.js 12.9 kB {0} [built]
    [92] ./js/api_flavor.js 1.86 kB {0} [built]
    [93] ./js/types/AmountField.js 3.12 kB {0} [built]
    [94] ./
    /admin-config/lib/Field/NumberField.js 3.44 kB {0} [built]
    [95] .//admin-config/lib/Field/Field.js 8.26 kB {0} [built]
    [96] ./
    /admin-config/lib/Utils/stringUtils.js 632 bytes {0} [built]
    [97] ./js/types/AmountFieldView.js 900 bytes {0} [built]
    [98] ./js/reviews/approveReview.js 1.77 kB {0} [built]
    [99] ./js/reviews/batchApprove.js 2.13 kB {0} [built]
    [100] ./js/reviews/starRating.js 585 bytes {0} [built]
    [101] ./js/commands/basket.js 3.69 kB {0} [built]
    [102] ./js/dashboard/dashboardSummary.js 2.29 kB {0} [built]
    [103] .//moment/moment.js 122 kB {0} [built]
    [104] ./
    /moment/locale ^./.*$ 2.33 kB {0} [optional] [built]
    [105] .//moment/locale/af.js 2.62 kB {0} [optional] [built]
    [106] ./
    /moment/locale/ar.js 4.56 kB {0} [optional] [built]
    [107] .//moment/locale/ar-ma.js 2.08 kB {0} [optional] [built]
    [108] ./
    /moment/locale/ar-sa.js 3.12 kB {0} [optional] [built]
    [109] .//moment/locale/ar-tn.js 1.94 kB {0} [optional] [built]
    [110] ./
    /moment/locale/az.js 3.31 kB {0} [optional] [built]
    [111] .//moment/locale/be.js 4.86 kB {0} [optional] [built]
    [112] ./
    /moment/locale/bg.js 3.1 kB {0} [optional] [built]
    [113] .//moment/locale/bn.js 3.62 kB {0} [optional] [built]
    [114] ./
    /moment/locale/bo.js 3.87 kB {0} [optional] [built]
    [115] .//moment/locale/br.js 3.41 kB {0} [optional] [built]
    [116] ./
    /moment/locale/bs.js 4.63 kB {0} [optional] [built]
    [117] .//moment/locale/ca.js 2.9 kB {0} [optional] [built]
    [118] ./
    /moment/locale/cs.js 6.4 kB {0} [optional] [built]
    [119] .//moment/locale/cv.js 2.33 kB {0} [optional] [built]
    [120] ./
    /moment/locale/cy.js 2.88 kB {0} [optional] [built]
    [121] .//moment/locale/da.js 2.07 kB {0} [optional] [built]
    [122] ./
    /moment/locale/de.js 2.88 kB {0} [optional] [built]
    [123] .//moment/locale/de-at.js 2.96 kB {0} [optional] [built]
    [124] ./
    /moment/locale/dv.js 2.69 kB {0} [optional] [built]
    [125] .//moment/locale/el.js 3.73 kB {0} [optional] [built]
    [126] ./
    /moment/locale/en-au.js 2.32 kB {0} [optional] [built]
    [127] .//moment/locale/en-ca.js 2.2 kB {0} [optional] [built]
    [128] ./
    /moment/locale/en-gb.js 2.38 kB {0} [optional] [built]
    [129] .//moment/locale/en-ie.js 2.37 kB {0} [optional] [built]
    [130] ./
    /moment/locale/en-nz.js 2.32 kB {0} [optional] [built]
    [131] .//moment/locale/eo.js 2.67 kB {0} [optional] [built]
    [132] ./
    /moment/locale/es.js 2.9 kB {0} [optional] [built]
    [133] .//moment/locale/et.js 3.14 kB {0} [optional] [built]
    [134] ./
    /moment/locale/eu.js 2.33 kB {0} [optional] [built]
    [135] .//moment/locale/fa.js 3.23 kB {0} [optional] [built]
    [136] ./
    /moment/locale/fi.js 3.86 kB {0} [optional] [built]
    [137] .//moment/locale/fo.js 2.1 kB {0} [optional] [built]
    [138] ./
    /moment/locale/fr.js 2.17 kB {0} [optional] [built]
    [139] .//moment/locale/fr-ca.js 2.02 kB {0} [optional] [built]
    [140] ./
    /moment/locale/fr-ch.js 2.19 kB {0} [optional] [built]
    [141] .//moment/locale/fy.js 2.58 kB {0} [optional] [built]
    [142] ./
    /moment/locale/gd.js 2.63 kB {0} [optional] [built]
    [143] .//moment/locale/gl.js 2.71 kB {0} [optional] [built]
    [144] ./
    /moment/locale/he.js 3.41 kB {0} [optional] [built]
    [145] .//moment/locale/hi.js 3.85 kB {0} [optional] [built]
    [146] ./
    /moment/locale/hr.js 4.77 kB {0} [optional] [built]
    [147] .//moment/locale/hu.js 4 kB {0} [optional] [built]
    [148] ./
    /moment/locale/hy-am.js 3.22 kB {0} [optional] [built]
    [149] .//moment/locale/id.js 2.94 kB {0} [optional] [built]
    [150] ./
    /moment/locale/is.js 4.43 kB {0} [optional] [built]
    [151] .//moment/locale/it.js 2.46 kB {0} [optional] [built]
    [152] ./
    /moment/locale/ja.js 2.21 kB {0} [optional] [built]
    [153] .//moment/locale/jv.js 2.94 kB {0} [optional] [built]
    [154] ./
    /moment/locale/ka.js 3.15 kB {0} [optional] [built]
    [155] .//moment/locale/kk.js 2.68 kB {0} [optional] [built]
    [156] ./
    /moment/locale/km.js 2.02 kB {0} [optional] [built]
    [157] .//moment/locale/ko.js 1.99 kB {0} [optional] [built]
    [158] ./
    /moment/locale/lb.js 4.85 kB {0} [optional] [built]
    [159] .//moment/locale/lo.js 2.29 kB {0} [optional] [built]
    [160] ./
    /moment/locale/lt.js 4.33 kB {0} [optional] [built]
    [161] .//moment/locale/lv.js 3.86 kB {0} [optional] [built]
    [162] ./
    /moment/locale/me.js 4.11 kB {0} [optional] [built]
    [163] .//moment/locale/mk.js 3.11 kB {0} [optional] [built]
    [164] ./
    /moment/locale/ml.js 2.78 kB {0} [optional] [built]
    [165] .//moment/locale/mr.js 5.36 kB {0} [optional] [built]
    [166] ./
    /moment/locale/ms.js 2.85 kB {0} [optional] [built]
    [167] .//moment/locale/ms-my.js 2.86 kB {0} [optional] [built]
    [168] ./
    /moment/locale/my.js 2.73 kB {0} [optional] [built]
    [169] .//moment/locale/nb.js 2.17 kB {0} [optional] [built]
    [170] ./
    /moment/locale/ne.js 3.74 kB {0} [optional] [built]
    [171] .//moment/locale/nl.js 2.57 kB {0} [optional] [built]
    [172] ./
    /moment/locale/nn.js 2.09 kB {0} [optional] [built]
    [173] .//moment/locale/pa-in.js 4.01 kB {0} [optional] [built]
    [174] ./
    /moment/locale/pl.js 3.94 kB {0} [optional] [built]
    [175] .//moment/locale/pt.js 2.31 kB {0} [optional] [built]
    [176] ./
    /moment/locale/pt-br.js 2.2 kB {0} [optional] [built]
    [177] .//moment/locale/ro.js 2.58 kB {0} [optional] [built]
    [178] ./
    /moment/locale/ru.js 6.12 kB {0} [optional] [built]
    [179] .//moment/locale/se.js 2.23 kB {0} [optional] [built]
    [180] ./
    /moment/locale/si.js 2.39 kB {0} [optional] [built]
    [181] .//moment/locale/sk.js 5.49 kB {0} [optional] [built]
    [182] ./
    /moment/locale/sl.js 6.09 kB {0} [optional] [built]
    [183] .//moment/locale/sq.js 2.41 kB {0} [optional] [built]
    [184] ./
    /moment/locale/sr.js 4.09 kB {0} [optional] [built]
    [185] .//moment/locale/sr-cyrl.js 4.11 kB {0} [optional] [built]
    [186] ./
    /moment/locale/sv.js 2.3 kB {0} [optional] [built]
    [187] .//moment/locale/sw.js 2.05 kB {0} [optional] [built]
    [188] ./
    /moment/locale/ta.js 4.21 kB {0} [optional] [built]
    [189] .//moment/locale/te.js 3.06 kB {0} [optional] [built]
    [190] ./
    /moment/locale/th.js 2.33 kB {0} [optional] [built]
    [191] .//moment/locale/tl-ph.js 2.14 kB {0} [optional] [built]
    [192] ./
    /moment/locale/tlh.js 4.06 kB {0} [optional] [built]
    [193] .//moment/locale/tr.js 2.9 kB {0} [optional] [built]
    [194] ./
    /moment/locale/tzl.js 3.59 kB {0} [optional] [built]
    [195] .//moment/locale/tzm.js 2.06 kB {0} [optional] [built]
    [196] ./
    /moment/locale/tzm-latn.js 2.11 kB {0} [optional] [built]
    [197] .//moment/locale/uk.js 5.4 kB {0} [optional] [built]
    [198] ./
    /moment/locale/uz.js 2.03 kB {0} [optional] [built]
    [199] .//moment/locale/vi.js 2.64 kB {0} [optional] [built]
    [200] ./
    /moment/locale/zh-cn.js 4.36 kB {0} [optional] [built]
    [201] .//moment/locale/zh-tw.js 3.12 kB {0} [optional] [built]
    [202] ./js/dashboard/dashboardSummary.html 4.28 kB {0} [built]
    [203] ./js/products/zoomInModal.js 1.55 kB {0} [built]
    [204] ./js/segments/segmentsState.js 800 bytes {0} [built]
    [205] ./js/segments/segmentsTemplate.html 1.03 kB {0} [built]
    [206] ./js/segments/segments.js 348 bytes {0} [built]
    [207] ./js/customers/config.js 5.49 kB {0} [built]
    [208] ./js/categories/config.js 874 bytes {0} [built]
    [209] ./js/products/config.js 4.04 kB {0} [built]
    [210] ./js/products/productsEditionTemplate.html 8.71 kB {0} [built]
    [211] ./js/reviews/config.js 4.1 kB {0} [built]
    [212] ./js/commands/config.js 2.7 kB {0} [built]
    [213] ./js/settings/config.js 482 bytes {0} [built]
    [214] ./js/dashboard/config.js 3.63 kB {0} [built]
    [215] ./js/header.html 1.07 kB {0} [built]
    [216] ./js/menu.js 2.37 kB {0} [built]
    [217] ./css/main.scss 41 bytes {0} [built]
    Child extract-text-webpack-plugin:
    chunk {0} extract-text-webpack-plugin-output-filename 1.56 MB [rendered]
    [0] ./
    /css-loader!.//sass-loader!./css/main.scss 670 bytes {0} [built]
    [1] ./
    /css-loader/lib/css-base.js 1.51 kB {0} [built]
    [2] .//css-loader!.//ng-admin/build/ng-admin.min.css 1.56 MB {0} [built]
    webpack: bundle is now VALID.

Update:

It is working on my macbook, but only when using http://127.0.0.1:8080/ instead of localhost in the browser.

On my remote Ubuntu instance, it's also running at http://127.0.0.1:8080 (verified via netstat) but I'm unable to access it via http://public_ip:8080. It looks like this may be due to an issue with a loopback, and that it's set up with 127.0.0.1 instead of 0.0.0.0 as localhost? So possibly more of an Ubuntu issue that anything. Do you have any advice on how to get ng-admin-demo running with a remote IP address?

It turns out this was just configuration setting with webpack-dev-server. For anyone else attempting this, I was able to access by remote IP after modifying this file:

~/ng-admin-demo/node_modules/webpack-dev-server/bin/webpack-dev-server.js

changed:
.describe("host", "The hostname/ip address the server will bind to").default("host","localhost")

to:
.describe("host", "The hostname/ip address the server will bind to").default("host","0.0.0.0")

There is an option for Webpack to prevent from changing binary directly: --host=0.0.0.0. I just opened a PR to fix that.

Thanks for your detailed explanations. :)

You bet! I'm really impressed with ng-admin so far, keep up the great work!