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
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
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 đó…...
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
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
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....
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
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....
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....
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
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...