Categories
Dev JavaScript

JSON

I’ve worked with JSON data before when I was learning Swift and iOS development. At the time I didn’t really know much of JavaScript or its object syntax. Back then, I made my version of a weather app callClima“. That app pulled down weather information based on your current location using JSON data from a third party API.

Having worked with JavaScript for the past few months JSON seems a lot more obvious now. This morning I made a simple IMDB like web app pulling data from http://omdbapi.com/. I still don’t know how to deploying these node.js apps to a server somewhere. As soon as I do I’ll update posts like this linking to my work.

It’s amazing to me how easy it is to get something quite functional up and running with node.js. A few NPM packages, access to a good source of data from a third party API and you’re away.

Even finding details on APIs for basically anything is really easy thanks to services like https://www.programmableweb.com/. It’s basically just a giant directory of anything and everything you might want to know about publically available APIs.

Learning all this kind of makes me feel like I’m discovering coding superpowers. It’s so easy it feels like cheating.

Categories
Dev JavaScript

NPM and a Demon

So learning node.js has been really interesting so far, I’m quite taken by it. It’s great being able to transfer my JavaScript skills from frontend to backend. One of the things I’m enjoying most about it is NPM. By their own definition:

NPM is the world’s largest software registry. Open source developers from every continent use NPM to share and borrow packages, and many organizations use NPM to manage private development as well.

Docs.npmjs.com. (2019). About npm | npm Documentation. [online] Available at: https://docs.npmjs.com/about-npm/ [Accessed 22 Mar. 2019].

So what does all this mean? As a developer, you have super easy access to a vast collection of code packages that can be used in your own projects or processes. One such package that’s saved me a repetitive task is nodemon. Nodemon does the simple job of restarting node every time I save a code change.

To install a package like nodemon you simply use the command:

npm install -g nodemon

In this command, the “-g” installs nodemon globally. This means it will work in all node projects. To run it use the command “nodemon” and your node server will fire up. Then each time you save a change to your code, bam, the server restarts to reflect the code change.

NPM has just shy of a million packages. So, if you’re in need of something to support a project, npmjs.com should be your first destination.