Skip to content

Tag: javascript

How to define custom Express.js route for vite dev server

I am translating my app from webpack configuration into vite. My current webpack dev server has custom endopint configured for doing some stuff. I need to have this same endpoint in vite config as well. How to do this? How can I define an express.js route for vite dev server? This endpoint is for loading envi…

Convert a string to date in JavaScript

I have the following string and I want to convert it to Date ‘20220722T141444Z’ In C# I converted it by telerik’s DateParser library. Is there a way to convert it in JavaScript as well? Answer There are many questions on parsing timestamps. In this case, you can just get the parts as two dig…