digiasset_ipfs_metadata_server
v0.1.0
Published
Clones DigiAsset Meta Data so there are many sources.
Downloads
1
Readme
##Step 1 (Install IPFS Desktop):
- Follow instructions at https://docs.ipfs.io/install/ipfs-desktop/
- Forward port 4001 to this machine
- If planning to run this all the time you may want to set IPFS to run on boot. In linux I did that by running
crontab -e
and adding@reboot /usr/local/bin/ipfs daemon
##Step 2 (Install NodeJS):
- Follow instructions at https://nodejs.org/en/download/
##Step 3 (Install this app):
- Copy files to a folder
- In console run
npm install
##Step 4 (Create API Key):
- Create an account at https://aws.amazon.com/
- Services->IAM
- In left column: Policies
- Blue Create policy button
- JSON
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:GetObjectAcl",
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::*/*",
"arn:aws:s3:::chain-data-address"
]
}
]
}
- Blue Review policy button
- name: digiassetX_data
- Blue Create policy
- In left Column: Groups
- Blue Create Group Button
- Group Name: digiassetX_data
- Type digi into search then select digiassetX_data
- Blue Next Step Button
- Blue Create Group Button
- On left panel select Users
- Blue add user button
- user name: digiassetX_data
- Select: Programmatic access
- Blue Next: Permissions button
- select: digiassetX_data
- Blue Next: Tags button
- Blue Next: Review button
- Blue Create user button
- Copy Access key ID and Secret access key into config/config.js
- click Close(make sure you have copied keys there will not be a second chance.
##Step 5 (Edit config):
- Open config/config.js
- Under includeMedia set the max file size you are willing to accept and what file types. If you will accept all files just comment out the names and mimeTypes lines by putting // before them
- The rest of the lines you will likely not want to change. Save the file.
##Step 4 (Run the program):
To run once
- in a command line type
node index.js
To run continuously in the background in linux
- Install PM2 by following instructions at https://www.vultr.com/docs/how-to-setup-pm2-on-ubuntu-16-04
- Add the app by running
pm2 start index.js --name meta
- To save so it starts on next boot
pm2 save
- You can check console logs by typing
pm2 log meta
#Step 5 (View Loaded Meta Data):
- Open a web browser
- In the address bar not the search bar enter
http://127.0.0.1:8090/
- You can now view any meta data that has been stored to your server, mark it as acceptable and delete content that is offensive.