Skip to content

Assigned port 4208 and updated all the endpoints in the env for local development#45

Merged
drtechie merged 1 commit into
PSMRI:developfrom
Asp-irin:develop
Jan 30, 2025
Merged

Assigned port 4208 and updated all the endpoints in the env for local development#45
drtechie merged 1 commit into
PSMRI:developfrom
Asp-irin:develop

Conversation

@Asp-irin
Copy link
Copy Markdown
Contributor

@Asp-irin Asp-irin commented Jan 29, 2025

📋 Description

  • Assigned port 4208 for local development.
  • Updated all relevant endpoints in the environment configuration

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

Summary by CodeRabbit

  • Configuration Updates

    • Updated Angular development server to run on port 4208
    • Modified local environment configuration to use localhost for API endpoints
  • Version Control

    • Added src/environments/environment.ts to .gitignore

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 29, 2025

Walkthrough

The pull request introduces configuration changes for a scheduler UI project. The modifications include updating the .gitignore to exclude an environment configuration file, setting a specific port for the Angular development server in angular.json, and adjusting local environment API endpoint configurations to use localhost with different port mappings. These changes appear to be preparing the project for local development and ensuring sensitive configuration files are not tracked by version control.

Changes

File Change Summary
.gitignore Added src/environments/environment.ts to ignored files
angular.json Added "options": { "port": 4208 } to serve architect section
src/environments/environment.local.ts Updated API endpoint IP addresses from http://183.82.107.186:8080/ to http://localhost with port adjustments

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant App as Scheduler UI
    participant API as Local APIs

    Dev->>App: Starts development server on port 4208
    App->>API: Connects to localhost APIs
    API-->>App: Responds via mapped ports (8083, 8088, 8089)
Loading

Poem

🐰 A Rabbit's Dev Delight

Localhost whispers, ports align just right,
Configurations dance in soft moonlight,
Ignored files hidden from version's sight,
Angular spins on four-two-oh's might,
A developer's dream takes gentle flight!

🌈✨

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
55.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.gitignore (1)

44-44: Good practice to ignore environment.ts!

Excluding environment.ts from version control is a security best practice. However, consider adding documentation about environment setup in README.md to help new developers.

Add a section in README.md explaining how to set up the environment:

## Environment Setup

1. Copy `src/environments/environment.local.ts` to `src/environments/environment.ts`
2. Update the configuration values as needed for your local setup
3. The `environment.ts` file is gitignored to prevent committing sensitive configurations
src/environments/environment.local.ts (1)

37-37: Clean up commented code.

There's commented code (const TM_API = \${tmIP}tmapi-v1.0/`;`) that should be removed if it's no longer needed.

-// const TM_API = `${tmIP}tmapi-v1.0/`;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 049d986 and 8acb89b.

📒 Files selected for processing (3)
  • .gitignore (1 hunks)
  • angular.json (1 hunks)
  • src/environments/environment.local.ts (1 hunks)
🔇 Additional comments (3)
angular.json (1)

116-119: Port configuration looks good!

The port 4208 is explicitly set for local development as intended. However, it's good practice to verify that this port is available and not used by other services.

✅ Verification successful

Port 4208 configuration is correctly set

Angular CLI will automatically handle port conflicts during development by suggesting the next available port if 4208 is already in use.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if port 4208 is already in use
if lsof -i :4208 > /dev/null; then
    echo "Warning: Port 4208 is already in use"
    lsof -i :4208
else
    echo "Port 4208 is available"
fi

Length of output: 165

src/environments/environment.local.ts (2)

27-29: Base URL configuration looks good!

Using localhost for all services is appropriate for local development.


32-35: Verify port availability for all services.

Each service is assigned a unique port (8083, 8088, 8089). However, we should verify these ports are available and document the port assignments.

Add port documentation in README.md:

## Local Development Ports

The following ports are used for local development:

- Angular Development Server: 4208
- Common API: 8083
- Scheduler API: 8088
- TM API: 8089

Ensure these ports are available before starting the services.

@drtechie drtechie merged commit 700a897 into PSMRI:develop Jan 30, 2025
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