HTML5, JavaScript, NodeJS

Serve static HTML files locally

Sometimes we need to serve static HTML files in localhost. And we really don’t want to add any server for a simple HTML file.

Serve static HTML files locally

Generally, we can right click on the HTML file and can say “open in browser” and it will open the file in your local browser(Chrome, Firefox, Edge, Safari) but it’s actually not exactly what we always want. rather we want something like a simple web server to serve the files from a directory.

Continue reading

Standard
JavaScript, React

Style React component with styled-components : Part-1

Styling your React component is an important part for any real world application.
We can style react components in a couple of ways. such as –
1. inline styling
2. CSS modules
3. emotion
4. styled-components

We will talk about styled-components in this article.

We are gonna create one simple animated loading spinner component.
Continue reading

Standard