---
# System prepended metadata

title: P4 GUI

---

# P4 GUI
- mongoDB (client)
    - source code path
        - /root/bf-sde-9.2.0/pkgsrc/bf-drivers/bf_switchd/bfrt_examples/throughput/P4Zeek.cpp
        - /root/bf-sde-9.2.0/pkgsrc/bf-drivers/bf_switchd/bfrt_examples/throughput/send_mongodb.py
- mondoDB (server) 
    - mongodb url (use mongoDB compass)
        - mongodb://root:root@localhost:27017/?authSource=admin&readPreference=primary&appname=MongoDB%20Compass&ssl=false  
    - port forwarding
    ![](https://i.imgur.com/KPX4csB.png)
        - use VScode and then connect to 
            - IP: 192.168.13.71
            - Username: p4user
        - port feature
            - 27017: connect to mongoDB Compass
            - 8000: connect to IDS http page
        - if change the port feature
            - mongoDB port
                - /home/p4user/DemoUI/DjangoApp/App/settings.py
                ![](https://i.imgur.com/PDfd2n0.png)
            - http port
                ```
                $ python /home/p4user/DemoUI/DjangoApp/manage.py runserver <http port>
                ```
- How to run your application mongoDB (website)
    ```
    $ cd /home/p4user/DemoUI/
    $ pipenv shell
    $ cd DjangoApp
    $ python manage.py runserver <specific http port>
    ```
- Rewrite http information
    - source code 
        - /home/p4user/DemoUI/DjangoApp/frontend/IDS/index.js