{"id":279103,"date":"2016-04-26T15:30:04","date_gmt":"2016-04-26T11:30:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=279103"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=279103","title":{"rendered":"\u0412\u0441\u0435, \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b"},"content":{"rendered":"\n<p><a href=\"https:\/\/github.com\/typicode\/hotel\">Hotel<\/a> \u2013 \u043f\u0440\u0438\u044e\u0442 \u0434\u043b\u044f localhost<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0432\u0430\u0448\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430<\/p>\n<p>  <\/p>\n<h2>\u0411\u043e\u043b\u044c\u0448\u0435, \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 <strike>\u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439<\/strike><\/h2>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043e\u043e\u043f\u0430\u0440\u043a \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: 9000, 8000, 8080, 3000, 3001\u2026<br \/>  \u0418\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u0410 \u0435\u0449\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u0435\u0431 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>gulp<\/li>\n<li>gulp serve<\/li>\n<li>gulp watch<\/li>\n<li>ionic serve<\/li>\n<li>browser-sync start &#8212;server &#8212;no-open &#8212;directory &#8212;files<\/li>\n<li>http-server -p 9000<\/li>\n<li>python -m http.server 8000<\/li>\n<li>php -S localhost:8000<\/li>\n<li>\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435&#8230;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 hotel.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h3>1. \u041f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043e\u0442\u0435\u043b\u044c<\/h3>\n<p>  <\/p>\n<pre><code>npm install -g hotel &amp;&amp; hotel start<\/code><\/pre>\n<p>  <\/p>\n<h3>2. \u0417\u0430\u0441\u0435\u043b\u0438\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u043e\u0442\u0435\u043b\u044c<\/h3>\n<p>  <\/p>\n<pre><code># foo project cd ~\/foo hotel add 'gulp' -n foo -o foo-hotel.log  # bar project cd ~\/bar hotel add 'gulp serve' -n bar -o bar-hotel.log  # baz project cd ~\/baz hotel add 'gulp watch' -n baz -o baz-hotel.log  # etc... hotel add 'ionic serve' hotel add 'browser-sync start --server --no-open --directory --files' hotel add 'http-server -p $PORT' hotel add 'python -m http.server $PORT' hotel add 'php -S localhost:$PORT'<\/code><\/pre>\n<p>  <\/p>\n<h3>3. \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043d\u0438 \u0436\u0438\u0432\u0443\u0442 \u0432 \u043e\u0442\u0435\u043b\u0435 <a href=\"http:\/\/localhost:2000\/\">http:\/\/localhost:2000\/<\/a><\/h3>\n<p>  <\/p>\n<h2>\u041a\u0430\u043a \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0431 \u043f\u0440\u043e\u0435\u043a\u0442\u0430?<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/localhost:2000\/foo\">http:\/\/localhost:2000\/foo<\/a><\/li>\n<li><a href=\"http:\/\/localhost:2000\/bar\">http:\/\/localhost:2000\/bar<\/a><\/li>\n<li><a href=\"http:\/\/localhost:2000\/baz\">http:\/\/localhost:2000\/baz<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 hotel.dev?<\/h2>\n<p>  <\/p>\n<p>Hotel \u043f\u043e\u0437\u043e\u0432\u043b\u044f\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c %\u043b\u044e\u0431\u043e\u0439%.dev \u0430\u0434\u0440\u0435\u0441 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0437\u0430\u0431\u043e\u0442\u043b\u0438\u0432\u043e \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u044f \u0432\u0430\u0448 \u0432\u0435\u0431 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u044f \u0432 \u043d\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e <a href=\"https:\/\/github.com\/typicode\/hotel\/blob\/master\/docs\/README.md\">\u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e\u043a\u0441\u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435<\/a><\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Proxy_auto-config\">proxy auto-config<\/a> \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 <a href=\"http:\/\/localhost:2000\/proxy.pac\">http:\/\/localhost:2000\/proxy.pac<\/a><\/p>\n<p>  <\/p>\n<pre><code>function FindProxyForURL (url, host) {   if (dnsDomainIs(host, '.dev')) {     return 'PROXY 127.0.0.1:2000';   }    return 'DIRECT'; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0440\u0430\u0437\u0443\u0435\u0440\u0443, \u0442\u043e \u0432\u0441\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430 .dev \u0431\u0443\u0434\u0435\u0442 \u0445\u043e\u0442\u0438\u0442\u044c \u0447\u0435\u0440\u0435\u0437 127.0.0.1:2000 \u043d\u0430 \u0432\u0430\u0448 \u0432\u0435\u0431<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 hotel.dev<br \/>  \u0410 \u0432\u0430\u0448\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 foo.dev, bar.dev, baz.dev<\/p>\n<p>  <\/p>\n<p>GitHub \u043f\u0440\u043e\u0435\u043a\u0442\u0430: <a href=\"https:\/\/github.com\/typicode\/hotel\">https:\/\/github.com\/typicode\/hotel<\/a><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0448\u0443 \u043f\u0440\u043e \u043e\u0447\u0435\u043f\u044f\u0442\u043a\u0438 \u0447\u0435\u043f\u044f\u0442\u0430\u0442\u044c \u0432 \u043b\u0438\u0447\u043a\u0443.<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/282511\/\"> https:\/\/habrahabr.ru\/post\/282511\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<p><a href=\"https:\/\/github.com\/typicode\/hotel\">Hotel<\/a> \u2013 \u043f\u0440\u0438\u044e\u0442 \u0434\u043b\u044f localhost<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0432\u0430\u0448\u0438\u0445 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430<\/p>\n<p>  <\/p>\n<h2>\u0411\u043e\u043b\u044c\u0448\u0435, \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0440\u0442\u043e\u0432 <strike>\u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439<\/strike><\/h2>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0437\u043e\u043e\u043f\u0430\u0440\u043a \u043f\u043e\u0440\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430: 9000, 8000, 8080, 3000, 3001\u2026<br \/>  \u0418\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<br \/>  \u0410 \u0435\u0449\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0434\u0435\u0432\u0435\u043b\u043e\u043f\u0435\u0440\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0432\u0435\u0431 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<p>  <\/p>\n<ul>\n<li>gulp<\/li>\n<li>gulp serve<\/li>\n<li>gulp watch<\/li>\n<li>ionic serve<\/li>\n<li>browser-sync start &#8212;server &#8212;no-open &#8212;directory &#8212;files<\/li>\n<li>http-server -p 9000<\/li>\n<li>python -m http.server 8000<\/li>\n<li>php -S localhost:8000<\/li>\n<li>\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435&#8230;<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0436\u0438\u0437\u043d\u044c \u043f\u0440\u043e\u0449\u0435 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 hotel.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-279103","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279103"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/279103\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}