Skip to content
This repository has been archived by the owner on Jul 13, 2018. It is now read-only.

why is server necessary? #1

Open
ariesshrimp opened this issue Apr 5, 2017 · 3 comments
Open

why is server necessary? #1

ariesshrimp opened this issue Apr 5, 2017 · 3 comments

Comments

@ariesshrimp
Copy link

ariesshrimp commented Apr 5, 2017

is there any good way to get this running without express? what work is it doing here?

@plag
Copy link
Owner

plag commented Apr 5, 2017

@joefraley You can use any server-side stack, that can print page src/dist/index.html to user browser. index.html - its bootstrap, so put this file on your server and use it.

Note: if your server address if different from http://127.0.0.1:8080 - change this setting in webpack.config.js

@ariesshrimp
Copy link
Author

Doesn't dev-server serve HTML though? Why can't I just hit
http://127.0.0.1:8080/
Directly?

This is the thing I'm not getting

@plag
Copy link
Owner

plag commented Apr 5, 2017

@joefraley oh, sorry if question on it. This is example for real world, where you separate client-side and server-side. You can empower webpack for initial page rendering, but in real applications you should build "production build" and put it on server as static file than attach on page through <script> tag.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants