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

Add built-in basic http server #3

Open
volks73 opened this issue Nov 29, 2017 · 0 comments
Open

Add built-in basic http server #3

volks73 opened this issue Nov 29, 2017 · 0 comments

Comments

@volks73
Copy link
Owner

volks73 commented Nov 29, 2017

A basic HTTP server, like this one, should be integrated with groom to locally serve rendered templates. The majority use-case for Mustache (and Handlebar) templates are websites and HTML. It would be nice during development of templates and testing to "host" the website generated from the templates.

A -s,--serve flag or a serve subcommand along with an alternative consuming method to the builder API for the application should be added. This would require renaming the run method to something like render or process and adding serve method that would consume the Groom struct and run the built-in server.

When the --serve flag is issued, groom would render the input template with the specified data and then look for a .html file of the same name as the template to serve. The server would start after rendering and be locally hosted at http://localhost:8080. A -p, --port option would also be added to change the port at run time.

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

No branches or pull requests

1 participant