-
Notifications
You must be signed in to change notification settings - Fork 321
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
Conversation
Hi @aokolish! Thank you for your pull request and welcome to our community. Action RequiredIn 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. ProcessIn 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 If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
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 | ||
``` | ||
|
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, closing.
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