From 4c5dafc21e3e1c17380a5acd8c8cbca92f4f58c7 Mon Sep 17 00:00:00 2001 From: Jason Park Date: Mon, 10 Jun 2019 02:15:10 +0900 Subject: [PATCH] Update documentation --- CONTRIBUTING.md | 43 +++++++++++++++++++++++++++++++++++++++++++ README.md | 9 +++++++++ 2 files changed, 52 insertions(+) create mode 100644 CONTRIBUTING.md create mode 100644 README.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e47a102 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# Contributing + +> #### Table of Contents +> - [Running Locally](#running-locally) +> - [Directory Structure](#directory-structure) + +Are you a first-timer in contributing to open source? [These guidelines](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution) from GitHub might help! + +## Running Locally + +1. Fork this repository. + +2. Clone your forked repo to your machine. + + ```bash + git clone https://github.com//server.git + ``` + +3. Install [Docker](https://docs.docker.com/install/), if not done already. + +4. Install dependencies, and run the server. + + ```bash + cd server + + npm install + + npm run watch + ``` + +5. Open [`http://localhost:8080/`](http://localhost:8080/) in a web browser. + +## Directory Structure + +- [**src/**](src) contains source code. + - [**config/**](src/config) contains configuration files. + - [**controllers/**](src/controllers) routes and processes incoming requests. + - [**middlewares/**](src/middlewares) contains Express middlewares. + - [**models/**](src/models) manages algorithm visualizations and their hierarchy. + - [**tracers/**](src/tracers) build visualization libraries and compiles/runs code. + - [**utils/**](src/utils) contains utility files. + +**NOTE** that for JavaScript, it builds a web worker rather than a docker image. Once a browser fetches the web worker, it will submit users' code to the web worker locally, instead of submitting to the remote server, to extract visualizing commands. diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb022ac --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Server + +> This repository is part of the project [Algorithm Visualizer](https://github.com/algorithm-visualizer). + +`server` serves [`algorithm-visualizer`](https://github.com/algorithm-visualizer/algorithm-visualizer) and provides APIs that the web app needs on the fly. (e.g., GitHub sign in, compiling/running code, etc.) + +## Contributing + +Check out the [contributing guidelines](https://github.com/algorithm-visualizer/algorithms/blob/master/CONTRIBUTING.md).