LibreChat/docs/contributions/testing.md
Fuegovic df2a68e1e7
Docs: updates & enhancements for MKDocs (#555)
* Update documents for mkdocs compatibility

* documents update

* documents update

* Update README.md

* Update README.md

add link to "https://docs.librechat.ai" on the logo

* document updates

* docs - badge updates

* docs - badge updates

* docs - badge updates

* Update docker_install.md

* Update .env.example

update default MONGO_URI to port 27018 so local install can communicate with the docker db

* Update windows_install.md

fix typo
2023-07-01 20:11:37 -04:00

1.2 KiB

Locally test the app during development

Run the app

Option 1: Run the app using Docker

For reproducibility and ease of use, you can use the provided docker-compose file:

  1. Comment out the portion pointing at the already built image

    image: chatgptclone/app:0.3.3
    
  2. Uncomment the portion pointing at the local source code

    # image: node-api
    # build:
    #   context: .
    #   target: node-api
    
  3. Build your local source code for the node-api target

    docker build `
      --target=node-api `
      -t node-api `
      .
    
  4. Docker-compose up

    docker-compose up
    

Option 2: Run the app by installing on your machine

  1. Install the prerequisites on your machine. See section above.

  2. Run the app on your machine. See section above.

Run the tests

  1. Install the global dependencies

    npm ci
    npx playwright install --with-deps
    
  2. Run tests

    npx playwright test
    

If everything goes well, you should see a passed message.