Skip to main content

Thursday, July 20, 2023

· 2 min read
  • HapiJS

Hapi.js — Project Structure and Best Practices (Part 2)

Optimizing HapiJS for Benchmarks. In the past year or so, our team… | by Joel Chen | Walmart Global Tech Blog | Medium

  • The confused saying in Microservices: "each service should own its own database and no two services should share a database"

No golden rule, no fast rules, no best practices suitable for all businesses, only tradeoff

Q: Need separate database per service? A: Creating a separate database for each service helps to enforce domain boundaries.

The Hardest Part About Microservices: Your Data – Software Blog

  • Nodejs development practices

Set default configs: author name, author email, author url, the license, and the version.

npm set init.author.name "Your name"
npm set init.author.email "your@email.com"
npm set init.author.url "https://your-url.com"
npm set init.license "MIT"
npm set init.version "1.0.0"
function node-project {
git init
npx license $(npm get init.license) -o "$(npm get init.author.name)" > LICENSE
npx gitignore node
npx covgen "$(npm get init.author.email)"
npm init -y
git add -A
git commit -m "Initial commit"
}

Setting up efficient workflows with ESLint, Prettier and TypeScript in vscode.

Setting up efficient workflows with ESLint, Prettier and TypeScript - JavaScript inDepth