Question

Hi I just started working with Pelican and it really suits my needs, I had tried to build blogs in Flask and other frameworks but I really just wanted something simple so I can post about math, and pelican just works.

My question is when I am testing on my machine, I start the server; however when I stop the server to make some edits to my test blogs, and then try to reload the server I get a socket already in use error. I am stopping my server by ctrl+z am I doing this correctly?

Was it helpful?

Solution

Use ctrl+c to terminate the process. ctrl+z will only send it's execution to the background.

On a separate note, since you are making changes and want to test them it would be more convenient to use $ make devserver instead of $ make serve. See docs.

OTHER TIPS

For your development server, you can also use the script ./develop_server.sh that comes with the last versions of pelican (at least with the 3.5.0). Build the blog and load a server with ./develop_server.sh start: it reloads each time you edit your blog (except the settings). Simply stop with ./develop_server.sh stop when you're finished.

When you press Ctrl + C or Ctrl + z, do not restart the HTTP server: it is running in the background, and that is the exact reason as why you are getting that error message.

To see that the server is running in the background after pressing the any of the key combinations above, try to edit and save any file: you will see right away in the terminal the re-generation process of your pages is active again.

You can start the HTTP server using this command: make devserver and stop by ./developer_server.sh stop

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top