Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

samp-dev/fiddle

Open more actions menu

Repository files navigation

PAWN Fiddle

PAWN Fiddle is a playground platform for the PAWN scripting language. Create, execute, fork and share code snippets across the SA-MP community.

Prerequisites

Local

  • Node.js
  • npm
  • yarn
  • sampctl
  • Firejail

Docker environment

  • Docker
  • (Docker Compose)

Installation

Local

  1. Install the dependencies and build the frontend
cd ui && yarn install && yarn build
  1. Install the dependencies and transpile the backend
cd .. && npm i && npm run compile
  1. Run the application
npm start

Docker environment

docker build -t samp-dev/fiddle .
docker run -p 3000:3000 -e APP_ID=pawnlang-fiddle \
-e PORT=3000 \
-e LOG_LEVEL=info \
-e REQUEST_LIMIT=1MB \
-e SESSION_SECRET= \
-e RECAPTCHA_SECRET_KEY= \
-e REACT_APP_RECAPTCHA_KEY= \
samp-dev/fiddle

You can find an example using Docker Compose here.

Configuration

Backend

Environment Variable Description
APP_ID App name (pawnlang-fiddle)
PORT App port (3000)
LOG_LEVEL Log levels of the app (info)
REQUEST_LIMIT Body request size limit (1MB)
SESSION_SECRET Secret string to sign cookies ()
RECAPTCHA_SECRET_KEY Google reCAPTCHA Invisible secret key ()

Frontend

Environment Variable Description
REACT_APP_RECAPTCHA_KEY Google reCAPTCHA Invisible site key ()

You can also set environment variables in an .env file.

Note: If no reCAPTCHA key pair is given, the test key pair will be used, which means all verification requests will pass.

Use cases

  • Library demos
  • Snippet hosting

Coming soon

  • REST API to create fiddles programmatically
  • More configurations (dependency limit, fiddle size limit, etc.)

License

This project is licensed under the terms of the MIT license.

About

A playground platform for the PAWN scripting language

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.