99x / 99x/dynamodb-localhost

Allow to run in the background

Open
#21 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
34
Forks
87
PR merge metrics
No merged PRs in 30d

Description

As simple as this command is, this is truly required on any setup that requires testing.

Ideally in my mocha tests, I would write in the global_config.js:

```
/* eslint-disable */
const dynamodbLocal = require('dynamodb-localhost');

// setup the database
before(async function () {
await dynamodbLocal.install();
await dynamodbLocal.start({ port: 8000 });
});

// teardown
after(async function() {
await dynamodbLocal.stop();
});

// run before each test
beforeEach(() => {});

// run after each test
afterEach(() => {});
```

Obviously with other test files next to it, who just make a dynamodb connection to the local test database.
This setup, the serverless plugin, or the original dynamodb-local, none of them support the option to run this in the background, as such, these are all useless when attempting to run a CI/CD job on. I can't tell a pipeline to "press ctrl-c" when you're done.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the existing dynamodb-localhost install(), start(), and stop() entry points and the command used to launch the local database. Check how the Mocha global_config.js example invokes these lifecycle methods in CI/CD, then verify that the background process can be started and stopped without requiring an interactive Ctrl-C.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, database, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.