aadeshkulkarni / figuringout

Blogging + Social Media + AI | Opensource | Javascript | ReactJS | HonoJS | Prisma
https://figuringout.life
MIT License
72 stars 78 forks source link

Configuration | 1 command to run 'em all #219

Closed aadeshkulkarni closed 5 days ago

aadeshkulkarni commented 6 days ago

Current scenario

At the moment, a developer needs to run 2 commands to spin up the app locally

cd frontend && npm run dev
cd backend && npm run dev

Expected Scenario

Run npm run dev from project root. This command should run the above commands behind the scenes.

We want to make developer experience smoother so that first time contributors can setup the projects quickly.

abidta commented 6 days ago

Hi @aadeshkulkarni , I'd like to work on this issue. Here's my plan:

  1. I will create a dev script in the root package.json that uses concurrently to run both frontend and backend development servers simultaneously.
  2. I will ensure that concurrently is added as a dev dependency in the root package.json.

Here's how the root package.json will look:


{
  "scripts": {
   "dev": "concurrently --prefix \"[{name}]\" --names \"frontend,backend\" \"cd frontend&& npm run dev \" \"cd backend && npm run dev\" "
  },
  "devDependencies": {
    "concurrently": "^8.0.0"
  }
}
aadeshkulkarni commented 6 days ago

Sounds good. Assigned the issue to you.

aadeshkulkarni commented 6 days ago

Please make sure you update the readme accordingly.