msk-mongo
Code for uploading sample data from JSON file to MongoDB database
Setup
- On MongoDB, create a database named
msk
with a collection calledsample_data
- Move a
edited_json.json
file with sample data to upload all data to the database (edited so that thedmp_sample_id
s are all unique) - Move a
new_input.json
file with new sample data into this directory - Create a
.env
file with variableMONGODB_URI
(find this on MongoDB connection configuration) - Run the following command to upload all sample data and then update it based on the
new_input.json
file:
go run main.go