This is the API module of prompt-injection.
npm ci
- Copy the example environment file .env.example and rename it to
.env
. - Replace the
OPENAI_API_KEY
value in.env
with your OpenAI API key. - Replace the
SESSION_SECRET
value with a random UUID or other long phrase.
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
To manually lint and format:
npm run lint
npm run format
npm test