Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to not creating files and clean up flies created during unit tests. #649

Closed
DevinCrumb opened this issue Jul 23, 2024 · 1 comment
Assignees

Comments

@DevinCrumb
Copy link

Describe the feature request

The Unleash Client is creating unwanted and prosibly problimatic files. The application may not have permission to write to the directory used by the client or there may be other reasons where creating a file is problematic. Default should be to not use the file system.

Also, when running the Unit Test, it creates files that it does not clean up. The Unit test needs to make sure any files it creates, it deletes when the test ends, even when the test fails.

Background

No response

Solution suggestions

No response

@ivarconr ivarconr self-assigned this Jul 29, 2024
@ivarconr
Copy link
Member

Hi,

you can customize this behaviour yourself via a custom store provider and the Node SDK comes with the InMemStorageProvider:

import { initialize, InMemStorageProvider } from 'unleash-client';

const client = initialize({
  appName: 'my-application',
  url: 'http://localhost:3000/api/',
  customHeaders: { Authorization: '<YOUR_API_TOKEN>' },
  storageProvider: new InMemStorageProvider(),
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants