1.1.2 • Published 12 months ago

xml-express v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

Easy to use XML Express Library

Just add:

const xmlserv = require('xml-express');
const app = express();
const file = "path/to/xml/file";
xmlserv.config(app, file);

It will listen by default on port 3000, no need for app.listen, or configure a custom port.

Example of xml config file:

<?xml version="1.0" encoding="UTF-8"?>
<root>
	<server>
		<static dir="public"></static>
		<route path="/" to="index.html"></route>
		<script>
			function configureCustomRoutes(app) {
      			  app.get('/custom', (req, res) => {
          		  	res.send('This is a custom route!');
        		  });
      			}
      
      			configureCustomRoutes(app);
		</script>
	</server>
</root>
1.1.2

12 months ago

1.1.0

12 months ago

1.0.0

12 months ago