20240527

Finished implementing the first phase of the personal project, both the backend and the frontend. -> Deployed :tada: dashboard.huyfififi.com

There are many issues I resolved today to deploy, and I want to write down them here but don't have tiem now. I will whenever possible.

Cloudflare Flexible SSL/TLS encryption modes

I was thinking about obtaining SSL/TLS certificates from Let's Encrypt by clearing its challenge, but as I tried to configure the VPS (the server for the web application), I noticed that it's already configured with SSL certificates. All I needed to do is simply serve the application via HTTP; Cloudflare automatically enables HTTPS for end users.

users <- (HTTPS) -> Cloudflare <- (HTTP) -> my VPS

I have my domain in Cloudflare, and it turned out that it's configured with Flexible mode. The connections between my VPS and Cloudflare is not encrypted at all, but the connections between users and Cloudflare are encrypted. This encryption mode is called Flexible.

Although it's definitely not recommended, my application does not contain any sensitive data, and I don't have enough time to do the right configuration now, I decided to let that work for the time being.

It seems to be useful to have very small and personal projects on the internet.

FYI: To make my subdomain dashboard.huyfififi.com points to the VPS, A record was added dashboard.huyfififi.com -> The static IP address of the VPS to map them.

As I mentioned before, I cannot get static IP addresses at home because I share a house and I will move soon. VPS (Virtual Private Server) such as Amazon Lightsail provides a feature to attach a static IP address, and it makes hosting personal projects possible at low cost.

Frontend Deployment

This is the first time I serve frontend to production (?) and I noticed that I did not understand how it works.

When developing features, node server is always run to serve the frontend.

However, frontend servers won't be used in production. The static files are generated from the build npm run build and the server (such as NGINX) serve them. I don't need to start a separate server for the frontend like I do in local development.

It's embarrassing that I was confused about that for a long time.


Sushi bowl 800 Avocado 200 Yogurt 500

Total 1500 kcal


TODO:


index 20240526 20240528