-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dotenv, tsconfig settings and basic bucket list functionality
- Loading branch information
Showing
7 changed files
with
233 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.env |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
console.log("Hello developer"); | ||
console.log("\n"); | ||
console.log("We have prepared multiple script for you to run."); | ||
console.log(` | ||
Hello developer | ||
We have prepared multiple script for you to run so you can see Apillon SDK in action. | ||
You will need to send ENV variables with you API key and secret to run examples. | ||
If you are running in codesandbox be careful of exposing the keys. | ||
We have all major functionalites as examples so you can run scripts: | ||
- npm run storage:buckets | ||
- npm run storage:bucket-content | ||
- npm run storage:bucket-upload | ||
- npm run identity:generate-signing-message | ||
`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Storage } from "@apillon/sdk"; | ||
import * as dotenv from "dotenv"; | ||
|
||
dotenv.config(); | ||
|
||
(async () => { | ||
const storage = new Storage({ | ||
key: process.env.APILLON_API_KEY, | ||
secret: process.env.APILLON_API_SECRET, | ||
}); | ||
|
||
const buckets = await storage.listBuckets(); | ||
console.log(buckets); | ||
})().catch(async (err) => { | ||
console.log(err); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
{ | ||
"include": ["src"], | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"module": "Node16", | ||
"declaration": true, | ||
"removeComments": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"allowSyntheticDefaultImports": true, | ||
"target": "es2017", | ||
"target": "ES2022", | ||
"sourceMap": true, | ||
"outDir": "./dist", | ||
"resolveJsonModule": true, | ||
"incremental": true | ||
"incremental": true, | ||
"moduleResolution": "node" | ||
} | ||
} |
Oops, something went wrong.