![Tony Spiro's avatar](https://imgix.cosmicjs.com/c50b1390-4c31-11ee-82b2-d53af1858037-tux-cropped.jpg?w=100&h=100&auto=format&dpr=2)
Tony Spiro
May 21, 2018
![cover image](https://imgix.cosmicjs.com/0572d8c0-5d11-11e8-9276-0b00f900a0a0-cosmicjs-npm.jpg?w=1000&auto=format&dpr=2)
This is a quick example to show some of the powerful things you can do with the Cosmic NPM Module. This script adds a Bucket to your Cosmic account, adds a Pages Object Type and adds a few Pages.
To run the code:
1. Copy the bucketSetupExample.js
file locally into a new folder.
2. cd your-folder; npm i cosmicjs
3. Add your secret authentication token to the code found in Account Settings > Authentication
4. node bucketSetupExample.js
You might also like