feat(blog): Add interactive start/stop functions
This commit is contained in:
		
							parent
							
								
									3d4aba1803
								
							
						
					
					
						commit
						4902e9c26c
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		
							
								
								
									
										10
									
								
								blog.el
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								blog.el
									
										
									
									
									
								
							| 
						 | 
					@ -44,6 +44,12 @@
 | 
				
			||||||
(defun elblog-handler (httpcon)
 | 
					(defun elblog-handler (httpcon)
 | 
				
			||||||
  (elnode-hostpath-dispatcher httpcon elblog-routes))
 | 
					  (elnode-hostpath-dispatcher httpcon elblog-routes))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(elnode-start 'elblog-handler
 | 
					(defun start-elblog ()
 | 
				
			||||||
 | 
					  (interactive)
 | 
				
			||||||
 | 
					  (elnode-start 'elblog-handler
 | 
				
			||||||
              :port 8010
 | 
					              :port 8010
 | 
				
			||||||
              :host "localhost")
 | 
					              :host "localhost"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(defun stop-elblog ()
 | 
				
			||||||
 | 
					  (interactive)
 | 
				
			||||||
 | 
					  (elnode-stop 8010))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue