Node.js - app.get() route

Node.js app routes is something that simplifies your API routes. Both for the app itself and for external API requests.

To get startet with get requests use the following code. This code will work after you've setup the necessary requires.

app.get("/page/:pageid/", function(req, res, next) {

	var startdate = req.params.start;
	var enddate = req.params.end;

	switch(req.params.pageid) {
		case '01':	
			//TODO: Show page 1
		break;

		case '02':
			//TODO: Show page 1
		break;

		default:
			//TODO: Handle error
		break;
	}

	res.send(xml);

});

Simple snippets explaining how to handle app.get routes in Node.js with params.

By adding ":param" to your get request, you can simply format your url's accordingly. and ex view different pages with different information depending on the user.

Our url's will look like this:
https://www.example.com/page/01/
https://www.example.com/page/02/

Google Shopping - Feed validator

Me and one of my colleagues - Jonathan Berling, created a little suit of tools for Merchant Center. These tools might lighten your workload, and day to day tasks for Google Shopping.

This includes a XML feed validator, generator and a way to generate files in order to prove ownership of accounts, on different services within Google. These tools are not by or in affiliation with Google, just two guys wanting to make their workday a bit less stressing.

https://instebo.one/projects/capi/validator/

Google Merchant Center - Web tools

I've been working with different customers on how to resolve their problems connected to the way products are uploaded to the service, using either txt, xml or Google's own API (Content API).

However recently i've seen more and more customers going away from eCommerce platforms, and started creating their own platforms. One of the questions i get a lot is how they can easily upload their XML feeds, without having to update the file itself, and store it locally, as we are using an URL.

My customers tends to use databases in order to store the products they are selling, and moving to a eCommerce provider means they will have to upload everything once more.

My solution pulls data from a database (MySql), and then converts it into a readable XML feed, which can be uploaded to do daily fetches inside Merchant Center. Without having the xml feed saved locally on a computer.

I'm a big fan of Open Source, and have therefore uploaded my solution to GitHub. Everyone should feel free to use this, as it might lighten your workload when it comes to online retail sales. Does this seem interesting to you? Pop over to GitHub and fork the repository! It's all free.

https://lnkd.in/dZj_cn6