So I’ve been working on a project that uses the Go programming language. The application I’m building is a web application that I plan to distribute. The thing is, I don’t want to distribute hundreds of files to make it possible. The application has an API built with Go and the front-end that consumes the API is built with Angular. This lead me searching for a way to bundle all the files into the final binary.
There are several packages that exist for bundling assets into a Golang application. Popular packages include go-bindata, go-bindata-assetfs, and go.rice. I had the most success with go.rice, so we’re going to explore it in this article.
Read MoreWhen it comes to API development, there is often a need to protect certain endpoints or rate-limit the API in general. Because you are working with endpoints from clients possibly on a different domain, you can’t authenticate users with sessions and cookies. It would also be a bad idea to pass around a username and password with each request. Typically endpoints are protected with tokens that are passed with each request and these tokens are often JSON Web Tokens (JWT) that work very well.
We’re going to see how to create a very simple API using Node.js with protected endpoints that require a valid JWT in order for requests to succeed.
Read MoreIf you haven’t already gotten involved with it, you’ll probably know that TypeScript is becoming increasingly popular. Being able to use a superset of JavaScript in a typed language that compiles down to JavaScript is a great thing. However, if you’ve ever played around with TypeScript and tried to use JavaScript libraries, you’ll probably know that sometimes it can be a real pain. Often JavaScript libraries do not ship with type definitions which are critical when it comes to playing nice with TypeScript.
If you’ve been keeping up with The Polyglot Developer you’ll probably remember two posts that were created. Previously I had written about including external JavaScript libraries in an Angular application as well as adding type definitions to external JavaScript libraries in TypeScript.
We’re going to revisit these two articles and explore all the ways to include JavaScript libraries in TypeScript applications. These include applications built with NativeScript, Ionic, and Angular.
Read MoreThe recent Amazon S3 outage that took down much of the internet inspired me to talk about alternatives. Not too long ago I wrote about an open source object storage software called Minio and how I was using it on my Raspberry Pi for backups. The great thing about Minio is it shares the same APIs as AWS S3, but can be deployed to your own hardware, eliminating Amazon as a dependency.
This time around I thought it would be great to share how to use Minio as an object storage for a Node.js application that uses the middleware, Multer, for handling file uploads.
Read MoreNot too long ago you’ll remember I wrote a full stack tutorial on developing a full stack movie database with the Go programming language. In that tutorial we made use of NoSQL as the database, Golang as the backend, and Angular as the client frontend. However, I realize that not everyone is a Go developer.
This time around we’re going to take a look at developing the same full stack movie database application, but using Node.js instead of Golang. It is a good example to show that elements in the stack are modular and each element is replaceable with another technology.
Read MoreWith all the technologies and platforms available, it opens the door to infinite possibilities for development and further validates the need of being a full stack developer. There are many stacks in existence, but one of my personal favorites includes Golang, Angular, and NoSQL.
So how do you apply all these stack technologies towards a fully functional application? Let’s look at a possible usage scenario before we explore the technologies.
A problem I’ve found myself having recently is keeping track of all my movies. Can you believe I’ve purchased the same film multiple times by accident? From this spawned my need to keep a database of every movie I purchased. Using NoSQL, Angular, and the Go programming language, we can create such an application to keep track of what films we own and for what platforms.
Read MoreI’ve been hearing a lot about websockets lately and how they can accomplish real time communication between applications and servers. They act as a compliment and possible alternative to RESTful APIs that have been around for significantly longer. With websockets you can do real time messaging for things like chat, communication with IoT, gaming, and a whole lot of other things that need instant communication between clients and the server.
A while back I had played around with websockets and Node.js using a library called Socket.io, but since I’ve been really getting into Golang I wanted to explore websockets using the Go programming language.
We’re going to check out how to create a chat application where the client is an Angular application and the server is a Golang application.
Read More