VSCodeServer - spin it up in under 10 minutes.
import { VSCodeServer } from '@mavogel/cdk-vscode-server'
new VSCodeServer(scope: Construct, id: string, props?: VSCodeServerProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
VSCodeServerProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: VSCodeServerProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { VSCodeServer } from '@mavogel/cdk-vscode-server'
VSCodeServer.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
domainName |
string |
The name of the domain the server is reachable. |
password |
string |
The password to login to the server. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly domainName: string;
- Type: string
The name of the domain the server is reachable.
public readonly password: string;
- Type: string
The password to login to the server.
Properties for the VSCodeServer construct.
import { VSCodeServerProps } from '@mavogel/cdk-vscode-server'
const vSCodeServerProps: VSCodeServerProps = { ... }
Name | Type | Description |
---|---|---|
additionalInstanceRolePolicies |
aws-cdk-lib.aws_iam.PolicyStatement[] |
Additional instance role policies. |
additionalTags |
{[ key: string ]: string} |
Additional tags to add to the instance. |
devServerBasePath |
string |
Base path for the application to be added to Nginx sites-available list. |
devServerPort |
number |
Port for the DevServer. |
homeFolder |
string |
Folder to open in VS Code server. |
instanceClass |
aws-cdk-lib.aws_ec2.InstanceClass |
VSCode Server EC2 instance class. |
instanceCpuArchitecture |
LinuxArchitectureType |
VSCode Server EC2 cpu architecture for the operating system. |
instanceName |
string |
VSCode Server EC2 instance name. |
instanceOperatingSystem |
LinuxFlavorType |
VSCode Server EC2 operating system. |
instanceSize |
aws-cdk-lib.aws_ec2.InstanceSize |
VSCode Server EC2 instance size. |
instanceVolumeSize |
number |
VSCode Server EC2 instance volume size in GB. |
vscodePassword |
string |
Password for VSCode Server. |
vscodeUser |
string |
UserName for VSCode Server. |
public readonly additionalInstanceRolePolicies: PolicyStatement[];
- Type: aws-cdk-lib.aws_iam.PolicyStatement[]
- Default: []
Additional instance role policies.
public readonly additionalTags: {[ key: string ]: string};
- Type: {[ key: string ]: string}
- Default: {}
Additional tags to add to the instance.
public readonly devServerBasePath: string;
- Type: string
- Default: app
Base path for the application to be added to Nginx sites-available list.
public readonly devServerPort: number;
- Type: number
- Default: 8081
Port for the DevServer.
public readonly homeFolder: string;
- Type: string
- Default: /Workshop
Folder to open in VS Code server.
public readonly instanceClass: InstanceClass;
- Type: aws-cdk-lib.aws_ec2.InstanceClass
- Default: m7g
VSCode Server EC2 instance class.
public readonly instanceCpuArchitecture: LinuxArchitectureType;
- Type: LinuxArchitectureType
- Default: arm
VSCode Server EC2 cpu architecture for the operating system.
public readonly instanceName: string;
- Type: string
- Default: VSCodeServer
VSCode Server EC2 instance name.
public readonly instanceOperatingSystem: LinuxFlavorType;
- Type: LinuxFlavorType
- Default: Ubuntu-22
VSCode Server EC2 operating system.
public readonly instanceSize: InstanceSize;
- Type: aws-cdk-lib.aws_ec2.InstanceSize
- Default: xlarge
VSCode Server EC2 instance size.
public readonly instanceVolumeSize: number;
- Type: number
- Default: 40
VSCode Server EC2 instance volume size in GB.
public readonly vscodePassword: string;
- Type: string
- Default: empty and will then be generated
Password for VSCode Server.
public readonly vscodeUser: string;
- Type: string
- Default: participant
UserName for VSCode Server.
The architecture of the cpu you want to run vscode server on.
Name | Description |
---|---|
ARM |
ARM architecture. |
AMD64 |
AMD64 architecture. |
ARM architecture.
AMD64 architecture.
The flavor of linux you want to run vscode server on.
Name | Description |
---|---|
UBUNTU_22 |
Ubuntu 22. |
UBUNTU_24 |
Ubuntu 24. |
AMAZON_LINUX_2023 |
Amazon Linux 2023. |
Ubuntu 22.
Ubuntu 24.
Amazon Linux 2023.