Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.dev.js #4

Open
vegtelenseg opened this issue Sep 28, 2017 · 8 comments
Open

server.dev.js #4

vegtelenseg opened this issue Sep 28, 2017 · 8 comments
Assignees
Labels

Comments

@vegtelenseg
Copy link

Hi,

Would you please illustrate how one would implement a development version of the production server?
I am trying to write functionality that will be handled by the server at runtime, but it's impossible to hit the server since it is not part of the dev environment.

Thanks

Siya

@tahnik
Copy link
Owner

tahnik commented Oct 21, 2017

Sorry I totally forgot about this issue. Do you still need any help with it?

@tahnik tahnik self-assigned this Oct 21, 2017
@tahnik tahnik closed this as completed Oct 30, 2017
@vegtelenseg
Copy link
Author

Yes, yes, I still do. Please help.

@tahnik
Copy link
Owner

tahnik commented Nov 6, 2017

If I understand your question correctly, you could just build the server and use

node ./server/bin/server.js

This would open the server at localhost:3000.

@tahnik tahnik reopened this Nov 6, 2017
@vegtelenseg
Copy link
Author

I would like to run the server in dev mode. At the moment, when I run npm run dev it does not include the server as part of the program, as a result, If I make any http request to it I get nothing in return. I want to be able to query the server in development mode. That is when I run npm run dev

@tahnik
Copy link
Owner

tahnik commented Nov 7, 2017

@Siyanda-Mzam Hm you're right. Do you have time for a pull request? I don't think I will be able to work on it very soon.

@tahnik
Copy link
Owner

tahnik commented Nov 7, 2017

@Siyanda-Mzam another thing you could do just to get some response from your server, you could run

npm run dev

in one terminal and

npm start

in another terminal. That might work too?

@vegtelenseg
Copy link
Author

I will work on it and PR. But I am also not sure if I can work on it immediately. Running npm run dev and npm start in separate terminals will work but will be counterproductive because everytime you need a change in the server, you will have to stop it, make the change, build it and run it again. So I think having a dedicated dev server is going to be much better.

@glomotion
Copy link

+1 for a dev version of the express server with Hotloading etc. :)

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

No branches or pull requests

3 participants