arc sandbox
Architect projects work locally and offline. It emulates most app resources defined in app.arc
:
@http
@static
@ws
@events
@queues
@tables
and@indexes
At this time
arc sandbox
does not emulate@scheduled
Usage
arc sandbox [--port|--verbose|--disable-symlinks]
Flags
-p
,--port
,port
Manually specify HTTP port (default3333
)-v
,--verbose
,verbose
Enable verbose logging--disable-symlinks
Disable symlinkingsrc/shared
and copy instead
Environment variables
NODE_ENV
defaulttesting
ARC_API_TYPE
- Set the API Gateway API type- Can be one of
http
(aliased tohttpv2
),httpv1
,rest
- Defaults to
http
- Can be one of
ARC_QUIET
- If present, disable (most) loggingPORT
- Manually specify HTTP port- Defaults to
3333
- Defaults to
ARC_EVENTS_PORT
- Manually specify event bus port- Defaults to
3334
- Defaults to
ARC_TABLES_PORT
- Manually specify local DynamoDB port- Defaults to
3335
- Defaults to
ARC_LOCAL
- If present and used in conjunction withNODE_ENV=staging|production
, emulates livestaging
orproduction
environment- Uses your local
.arc-env
file's@staging
or@production
environment variables - Connects Sandbox to live AWS events and DynamoDB infra
- Requires valid AWS credentials with the same profile name as defined in your project manifest
- Uses your local
Local Database
Sandbox creates an in-memory instance of dynalite with @tables
and @indexes
found in the app.arc
file. When Sandbox is terminated, any data written is cleared from memory. The default endpoint is http://localhost:5000
. You can set a custom port by using an environment variable, ARC_TABLES_PORT=5555
Connect sandbox to the staging database
NODE_ENV=staging ARC_LOCAL=1 arc sandbox
File watching
The sandbox restarts when the following files or directories are modified:
app.arc
@views
source folder@shared
source folder@static
source folder if fingerprinting is enabled