Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Automates the process of running development environment #71

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Pratik2026
Copy link
Collaborator

Overview

This PR does the following: It introduces the Automation for the setup and running development environment server to streamline the development workflow.

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
  • The PR is made from a branch that's not called "main/master".

cd backend

## install the backend dependencies
echo "installing backend dependencies..."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setup script should do the following -

  • Installing dependencies
  • Starting docker container
  • Migrations and Seeding database

dev-env.sh Outdated
cd backend

## Run migration
npm run migrate:dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dev script should just start the server and docker container at both frontend and backend.

@Pratik2026 Pratik2026 requested a review from Bhavik-ag July 15, 2023 08:53
@Pratik2026
Copy link
Collaborator Author

@Bhavik-ag There's a minute issue which I would like to discuss, on executing dev-env.sh file since we are running backend server in background (detached from the terminal) it causes the port 3333 remains in use even though the terminal has been killed due to which devs will have to either reopen the editor or manually close the port if they want to rerun the server.

@Pratik2026
Copy link
Collaborator Author

One possible solution would be to create a Cleanup function which will close the port whenever the terminal got closed. Let me know if this required.

dev-env.sh Outdated
cd ../frontend

## start the frontend development server
npm run dev & gnome-terminal -- npm run dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here npm run dev is executed two times which cause the frontend server to start on both port 3000 and 3001.

@Bhavik-ag
Copy link
Collaborator

@prajjwalkapoor Do you have any idea on the mentioned issue by @Pratik2026?

@Pratik2026 Pratik2026 requested a review from Bhavik-ag July 16, 2023 04:46
@Bhavik-ag Bhavik-ag requested a review from prajjwalkapoor July 18, 2023 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants