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

Update hello world instructions #1660

Closed
wants to merge 1 commit into from
Closed

Conversation

aokolish
Copy link

Summary

Just a small update to the Hello World exercise to make it easier if anyone else tries to do it.

Test Plan

n/a

@facebook-github-bot
Copy link
Contributor

Hi @aokolish!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Comment on lines +95 to +100
If your server is running, stop it by pressing Ctrl+C. Then, start the server and rebuild the image to pick up the changes:

```bash
docker compose up --build
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, this isn't true for the recommended development (dev containers), which will automatically restart without the need for this build.

We can keep a reminder in here if you aren't using dev containers, but it needs to be caveated e.g. by adding a subheader or note, something like:


Let's add the endpoint. In src/OpenMediaMatch/app.py, add a route to the Flask app like so:

@app.route("/hello")
def hello_world():
    return "Hello, world!\n"

Then save the file! If you are using the recommended development environment with a devcontainer, flask will detect a changed file and automatically restart the server, picking up your changes!

If you are not using a devcontainer you might need to stop your server and rebuild the image to pick up changes with docker compose up --build. This is a lot slower than using the devcontainer!

Copy link
Author

Choose a reason for hiding this comment

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

Oh, I see. I first followed the README instructions which said to use docker compose up. Then, found this file and also I don't use VSCode so I skipped that for now. I'll give it a shot today.

Copy link
Contributor

Choose a reason for hiding this comment

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

The CONTRIBUTING is target at developers, and the hello world is the test to see if you have your development environment set up correctly :P

Copy link
Author

Choose a reason for hiding this comment

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

Heh, closing.

@aokolish aokolish closed this Oct 18, 2024
@aokolish aokolish deleted the patch-1 branch October 18, 2024 18:39
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.

3 participants