How to use npm behind a proxy

NPM Logo

Coding some examples from the book Arquitecturas Web con Angular.js about setting up a basic web server using Node.js and Express.js and i needed to install Express.js on my project. At the moment i’m in corporate environment and we are behind a proxy. So, i tried to install Express using npm with this command:

And i got this error:

Because of the proxy. So, how do you configure npm to work behind a proxy?

Continue reading

Hibernate validator: Difference between @NotBlank and @NotEmpty

Recently i was teaching about using Hibernate Validator with Spring MVC. Because of that, i was checking the complete list of available annotations for bean properties.

Then, i discovered annotation @NotBlank, which was new for me because i only knew @NotEmpty and @NotNull. The documentation is clear to establish the difference between them:

Continue reading