Skip to content

Commit 440bf60

Browse files
committed
feat: readme
1 parent 7dc37d7 commit 440bf60

File tree

3 files changed

+110
-3
lines changed

3 files changed

+110
-3
lines changed

assets/working.png

129 KB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"files": [
2525
"lib/**/*"
2626
],
27-
"author": "Hemanth Krishna <[email protected]> (https://github.com/DarthBenro008)",
27+
"author": "Hemanth Krishna <[email protected]> (https://github.com/DarthBenro008)",
2828
"license": "MIT",
2929
"devDependencies": {
3030
"@typescript-eslint/eslint-plugin": "^4.12.0",

readme.md

Lines changed: 109 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,112 @@
1+
# DotCloud
2+
13
![banner](assets/banner.png)
24

3-
## Introduction
5+
> __DotCloud is a simple cloud hosted .env management solution that would help you reduce the risk of manually handling sensitive keys.__
6+
7+
## The Reason
8+
9+
- Have you faced issues in managing your .env variables?
10+
- Are you risking exposing sensitive keys to other contributors or interns at your organisation?
11+
- Do you need to temporarily provide access to certain key to someone?
12+
- Do you need a solution where you don't need to migrate your .env variables as you jump across hosting?
13+
- Would you like a place where you can manage all your .env varibles of all projects in one place?
14+
15+
DotCloud is a simple solution to all the aforementioned problems.
16+
17+
## Usage
18+
19+
Make sure you create a account in DotCloud API. This can be achieved via:
20+
21+
- Setting up DotCloud API on your own custom server, source code can be found [here](https://github.com/ShubhamPalriwala/DotCloud-API)
22+
- Running our Postman Collection and creating your project, refer [here](#dotcloud-api)
23+
24+
If you have your .env in the following way
25+
26+
```env
27+
myKey=12345
28+
myKey1=54321
29+
```
30+
31+
> Obtain your project token from DotCloud API after creating a project.
32+
33+
### To get a single key
34+
35+
```js
36+
const dotCloud = require("dotcloud").init(
37+
"8880c820-af4b-4554-83c4-4ed4e97e0436", // Token
38+
"projectName" // Your Project Name
39+
);
40+
41+
async function getKey() {
42+
const data = await dotCloud.fetchKey("myKey");
43+
return data;
44+
}
45+
46+
getMyKey(); // Return the value of the key, i.e: 12345
47+
48+
```
49+
50+
### To fetch all the keys of the project
51+
52+
```js
53+
const dotCloud = require("dotcloud").init(
54+
"8880c820-af4b-4554-83c4-4ed4e97e0436", // Token
55+
"projectName" // Your Project Name
56+
);
57+
58+
async function getKeys() {
59+
const data = await dotCloud.fetchAllKeys();
60+
return data;
61+
}
62+
63+
const keys = getKeys();
64+
65+
console.log(keys.myKey) // Prints 12345
66+
console.log(keys.myKey2) // Prints 543210
67+
```
68+
69+
### Custom DotCloud Domain
70+
71+
If you have set-up DotCloud on your own servers, you can pass the url like the following.
72+
73+
```js
74+
const dotCloud = require("dotcloud").init(
75+
"8880c820-af4b-4554-83c4-4ed4e97e0436", // Token
76+
"projectName" // Your Project Name,
77+
"https://dotcloud.benro.tech" // Custom DotCloud API Server setup. (Optional)
78+
);
79+
```
80+
81+
## DotCloud API
82+
83+
To use this package, make sure you create an account with out DotCloud API, which can be found [here](https://documenter.getpostman.com/view/11026000/TW6tNAhC).
84+
85+
The source code for the API can be found [here on GitHub](https://github.com/ShubhamPalriwala/DotCloud-API)
86+
87+
You can also directly run our API Collection in Postman.
88+
89+
[![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/3ab4377ff5f19cd3f345#?env%5BAzure%5D=W3sia2V5IjoidXJsIiwidmFsdWUiOiJodHRwczovL2RvdGNsb3VkLmF6dXJld2Vic2l0ZXMubmV0IiwiZW5hYmxlZCI6dHJ1ZX1d)
90+
91+
## Working Principles
92+
93+
![Working Principles](assets/working.png)
94+
95+
## Show your support
96+
97+
Give a ⭐ if this project made your life easy!
98+
99+
Spread the word to your Backend Developer fellows to make thier life easier too!
100+
101+
## Contributions
102+
103+
- Feel Free to Open a PR/Issue for any feature or bug(s).
104+
- Make sure you follow the community guidelines!
105+
- Feel free to open an issue to ask a question/discuss anything about DotCloud.
106+
- Have a feature request? Open an Issue!
107+
108+
## License
109+
110+
Copyright 2021 Hemanth Krishna
4111

5-
The new way to safely store your .env variables!
112+
Licensed under MIT License : <https://opensource.org/licenses/MIT>

0 commit comments

Comments
 (0)