Lập trình viên không phải chỉ cần biết code

My talk about this: https://www.youtube.com/watch?v=GJW3GDnrRK8 This post is imported from: https://thebrownbox.hashnode.dev/lap-trinh-vien-khong-phai-chi-can-biet-code

August 6, 2025 · 1 min

Một trong những khó khăn lớn nhất trong công việc của tôi

The Problems Thừa nhận mình sai hoặc mình không làm được, hoặc mình đang gặp khó khăn trong một task nào đó. Khó khăn trong việc tìm sự trợ giúp từ team khác Changes Mindset: Chấp nhận rằng mình là một người Kém / Beginner/ Một người còn thiếu sót => Dễ dàng nhận lỗi và sai lầm hơn, thẳng thắn chia sẻ với PM rằng cái này tao không biết làm đâu, chắc phải mất một thời gian để nghiên cứu đó…...

August 6, 2025 · 1 min

Multiple .env for multiple countries

I don’t handle multiple countries for my own app but my app on companies do. Having these .env files: .env.production.sg .env.production.uk @Module({ imports: [ ConfigModule.forRoot({ isGlobal: true, envFilePath: `.env.${process.env.RAILWAY_ENV}.${process.env.RAILWAY_COUNTRY}`, }), ], }) export class AppModule { constructor() { console.log(`RAILWAY_ENV: ${process.env.RAILWAY_ENV}`); console.log(`RAILWAY_COUNTRY: ${process.env.RAILWAY_COUNTRY}`); } } Above just for non-sensitive data (which can be expose) tho… This post is imported from: https://thebrownbox.hashnode.dev/multiple-env-for-multiple-countries

August 6, 2025 · 1 min

Manual load .env file in NestJS

As I mentioned before that we can just use ConfigModule with .env file. But sometimes we need to access .env variables at the beginning of time, when the module is not fully loaded yet. Then we manually load it in the top of the main.ts file. import * as dotenv from 'dotenv'; dotenv.config(); This post is imported from: https://thebrownbox.hashnode.dev/manual-load-env-file-in-nestjs

August 5, 2025 · 1 min

Just something on my mind

Dạo này có nhiều người chết quá. Từ việc thi thoảng có một ông IT nào đó bên TQ bị đột quỵ, đến một số người trong ngành IT và chạy bộ cũng đột quỵ. Rồi đến những người nổi tiếng như sếp Hoàng Nam Tiến và một người rất gần với chúng tôi là chị L bạn của vợ tôi cũng mới phát hiện ung thư và đã di căn....

August 4, 2025 · 2 min

.env with vite

In vite project I use only 2 files: .env.development .env.production The env auto match with your build process without extra manual modification. This post is imported from: https://thebrownbox.hashnode.dev/env-with-vite

August 2, 2025 · 1 min

Setup CORS with domain

This is my current setup for all of my backend services, this CORS is based on my domain. (this one is generated by AI, I haven’t fully tested it) // Enable CORS app.enableCors({ origin: (origin, callback) => { // Allow requests with no origin (mobile apps, Postman, etc.) if (!origin) return callback(null, true); // List of allowed origins const allowedOrigins = ['http://localhost:9000']; // Check if origin is in the allowed list if (allowedOrigins....

July 20, 2025 · 1 min

Simple .env management with NestJS (with Railway)

I usually deploy my backend in railway. So I usually have only 2 env: local and prod. Create 2 env files: Copy file to .env file in deploy step in package.json Make sure in the PROD deployment we run the correct command (in this case is Railway) Make sure .env file is in .gitignore Note: Variables only load if you install @nestjs/config and import it from AppModule @Module({ imports: [ConfigModule.forRoot()], controllers: [AppController], providers: [AppService], }) export class AppModule {} This post is imported from: https://thebrownbox....

July 20, 2025 · 1 min

.env files in Quasar (VueJS)

Managing environment variables in quasar quite simple. My use case only have 2 environments: local & production. So I have only 2 files: .env.dev : for local .env.prod: for production No need naming conventions when work with quasar: And access through process.env.name_of_var as normal This post is imported from: https://thebrownbox.hashnode.dev/env-files-in-quasar-vuejs

July 19, 2025 · 1 min

Remove Hash Mode on Netlify (VueJS)

Sometimes our FE framework make the default history mode is hash mode. So the url gonna look like this: https://domain.com/#/path It looks unnatural and also make us confuse when navigating. To remove this: In the code Do not use createWebHashHistory Use createWebHistory instead In the root directory create new file name: netlify.toml content is below, this is to make sure our spa app is handling the routing, not the webserver...

July 19, 2025 · 1 min