i582 / play-vlang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

V Playground: Run, Edit, Share V Code Online

This repository contains the source code for V's playground (https://play.vlang.io).

Developing

Quick, containerized local development (recommended)

Using Docker Compose

git clone https://github.com/vlang/playground
cd playground
docker-compose up -d

then access the playground at http://localhost:5555

Using VSCode DevContainers

  1. Install Docker
  2. Install Visual Studio Code
  3. Install the Remote Development extension for VS Code
  4. Clone https://github.com/vlang/playground
  5. Create your application within a container (see gif below)

Done. And your system will remain "clean".

vscode-open-in-container

Then just run

make run

then access the playground at http://localhost:5555

Run the playground locally (not recommended)

NOTE: This is not recommended, as it requires you to install V and all of its dependencies manually. Only works on Linux.

Install Dependencies

We use isolate to sandbox the playground, so you need to install it first.

git clone https://github.com/ioi/isolate /tmp/isolate
cd /tmp/isolate
make isolate isolate-check-environment
make install

Run the server

git clone https://github.com/vlang/playground
cd playground
v run server.v

then access the playground at http://localhost:5555

About

License:MIT License


Languages

Language:JavaScript 35.9%Language:TypeScript 28.0%Language:CSS 13.0%Language:HTML 12.9%Language:Shell 4.4%Language:V 3.5%Language:Dockerfile 2.0%Language:Makefile 0.2%