Skip to content

ferencsarai/bee-key-value-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bee key-value store example

run

npm install

npm install

example

ts-node src/index.sh

starting Bee in devcontainer.json

devcontainer.json:

"postStartCommand": "./start.sh"

start.sh:

  • npm install
  • It starts the Bee in dev mode with cors=*; the Bee output is in the nohup.out file
  • Purchases a stamp
  • Add the stamp value to the STAMP environment variable, which the index.ts file loads.
  • Starts the index.ts
npm install
nohup bash -c 'bee dev --cors-allowed-origins="*" &'
sleep 3
STAMP=$(swarm-cli stamp buy --yes --depth 20 --amount 10000000 | grep "Stamp ID:" | cut -d " " -f 3)
echo $STAMP
export STAMP
echo "export STAMP='$STAMP'" >> ~/.bashrc
ts-node src/index.ts