Angular 6 – Configure Angular Universal with pm2

Angular Universal allows Angular apps to be run in both the server and in the browser. Before, I used the plain Express server to serve the static Angular application and I used the pm2 tool to manage the server process. With Angular Universal, the same is used to make it work with pm2.

Starting the process

The usual way to start the Angular Universal web server is this:

# yarn
yarn run serve:ssr
# npm
npm run serve:ssr

With pm2, you can’t run the yarn command just like that. Instead, look at the package.json and find the actual command executed. This is the command that I’ve found for the serve:ssr command:

node start dist/server

Here is the pm2 compatible version:

pm2 start dist/server

That’s it! Will post the full details about my Angular Universal experience in the next posts.

Posted in Angular, NodeJS, Web Development | Tagged , , | Leave a comment

jQuery Steps plugin broken on Safari 11 when content has the $ character

We are using an old plugin called jQuery Steps in one of our important page. We received reports that the page is not working on a Mac High Sierra using Safari 11. I fired a BrowserStack test and found out … Continue reading

Posted in Web Development | Tagged , | Leave a comment

Learn Stock Trading By Virtual Trading From Investagrams

As a complete newbie on stock trading, I really have no idea on how to buy or sell stocks. Fortunately, a good friend of mine recommended virtual trading to learn how it works. He recommended Investagrams and I immediately signed … Continue reading

Posted in Investments | Tagged , | 3 Comments

My Journey To Stock Market Begins

Few years ago, I always dream of having a retirement strategy through stock market investments but either I have no extra money to fund my investments or I have difficulty signing up for an online broker. Now that I’m already … Continue reading

Posted in Investments | Tagged | Leave a comment

Using Angular-CLI with Yarn

Recently, I have switched from npm to yarn, however, it seems that my Angular CLI still uses npm. To configure Angular CLI to use yarn globally, just run this: For Angular 6 and above: For below Angular 6: This is … Continue reading

Posted in Angular | Leave a comment

Angular 6 Now Available

I got a very short window of opportunity to update my dead projects to the latest NodeJS and Angular and I just checked that Angular 6 is now available. My portfolio site, which was built on Angular 4.4 has been … Continue reading

Posted in Angular | Leave a comment

ExpressJS – Serve a Google Verification Page

My portfolio website is using Angular served by ExpressJS. For more than six months, I forgot to check my Google Webmaster tool and it shows that I don’t own the site anymore. What a shame! I have to verify the … Continue reading

Posted in Angular, NodeJS | Tagged , | Leave a comment

RubyMine 2018 theme is too flat, how to bring back the old theme?

So if you just installed the latest RubyMine for 2018 and installed the Material UI plugin, the whole RubyMine interface will use the Material design for the UI which means, everything is flat. If you don’t like it and prefer … Continue reading

Posted in Personal Blog, Web Development | Tagged | Leave a comment

Cannot Edit SOA for SSN PRN?

Have you tried using SSS PRN PRN (Payment Reference Number) utility but unable to edit it for the current period? Did you get the “Web page blocked” error when trying to edit your SOA (Statement of Account) to change the … Continue reading

Posted in Personal Blog | Tagged , | Leave a comment

Inserting page breaks for printing or PDF via HTML

So we have a web invoice which is also converted into PDF. When line items section becomes too tall (so many items), the generated PDF from HTML (via wkhtmltopdf) breaks some of the lines in the summary section and is … Continue reading

Posted in CSS, Web Development | Tagged , , | Leave a comment