Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 876 Bytes

README.md

File metadata and controls

56 lines (39 loc) · 876 Bytes

prompt-injection-api

This is the API module of prompt-injection.

Install

npm ci

Setup Environment

  1. Copy the example environment file .env.example and rename it to .env.
  2. Replace the OPENAI_API_KEY value in .env with your OpenAI API key.
  3. Replace the SESSION_SECRET value with a random UUID or other long phrase.

Run

Start the server:

npm start

Or for development, to hot-reload on changes:

npm run dev

You can also run using Docker if you prefer:

# Start the server
npm run docker:start
# View the logs
npm run docker:logs
# Stop the server
npm run docker:stop

Linting and Formatting

To manually lint and format:

npm run lint
npm run format

Test

npm test