https://github.com/dxsooo/code-server-masscode
Open VSCode server with massCode inside
https://github.com/dxsooo/code-server-masscode
masscode snippets vscode
Last synced: 11 days ago
JSON representation
Open VSCode server with massCode inside
- Host: GitHub
- URL: https://github.com/dxsooo/code-server-masscode
- Owner: dxsooo
- Created: 2023-07-23T10:04:35.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-03T09:46:27.000Z (over 2 years ago)
- Last Synced: 2025-06-15T16:45:58.281Z (8 months ago)
- Topics: masscode, snippets, vscode
- Language: Dockerfile
- Homepage:
- Size: 2.54 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-NAS-Docker - 点我查看 - server-masscode?&label=) |  | (置顶 / 1、AI应用生态)
README
# Code-server-massCode
This project is a dockerfile source for the image that intergates vscode server, [massCode](https://masscode.io/) and its extension for vscode([massCode Assistant](https://marketplace.visualstudio.com/items?itemName=AntonReshetov.masscode-assistant)). Taking the advantage of massCode, the image can be deployed as a web IDE that can use customed code snippets.
```mermaid
flowchart BT
subgraph Image
subgraph IDE
MassCodePlugin[massCode Assistant]
VScode
end
massCode-->MassCodePlugin[massCode Assistant]
CodeSnippets((Code Snippets))-->massCode
end
```
It is useful if you are a code snippet provider and you want to let your users code with web IDE. Or you get used to code in self-hosted web IDE on your cloud server and want to use managed code snippets. What you need to do is managing snippets with massCode.
## Usage
As the image built with the [Dockerfile](./Dockerfile) doesn't contain any code, you should take the image as base image and prepare
code snippets with massCode in your image building machine. Copy the massCode folder (the folder is `/home/{your_name}/massCode` by default) to this project directory and your dockerfile may looks like:
```dockerfile
FROM dxsooo/code-server-masscode:1.0
COPY massCode /root/massCode
```
Or just add the COPY command into the [Dockerfile](./Dockerfile) and build your own image. You had better to do more such as adding more extensions to make the IDE better for development.
Deploy with:
```bash
# replace the image with your own and mount your code path
docker run --name code-server -p8080:8080 -v{your_code_path}:/home/coder/projects -d dxsooo/code-server-masscode:1.0
```
And the web IDE would serve in: http://localhost:8080 . See https://github.com/cdr/code-server for more docs.
## Thoughts
Maybe there is another way to do this, such as following [snippet guide](https://code.visualstudio.com/api/language-extensions/snippet-guide) from vscode, pack the snippets to an extension and release it or pack it into web IDE image. But this would take cost to edit snippet jsons or migrate from massCode(or some other snippet management tools) to align to vscode snippets rules.