js. I gave myself a few days to tackle this project and prove some people wrong. Please note that i haven’t done any ios development in the past three years, so we needed to install all the necessary tools to get this started and now that node.js runs natively on m1. Well, even better. So i went ahead and installed homebrew for apple silicon. Use that to install node and downloaded xcode for us to get started. The goal here is to create a server that accepts some coordinates, such as latitude and longitude, and allow them to be stored using a database. My plan was to use postman with compass as a client prior building, the app on xcode and because i’m currently running a baseball laptop. Well, i thought let’s do some laptop work, so i decided to unplug the charger use their magic keyboard as well as this great track pack with awesome, haptic feedback, and so the backend system was priority. Number one i needed to install the tools that would allow me to create a simple rest api and because i wanted the scalability, i tried to follow an mvc model to support further enhancements configuring. The server wasn’t too hard. All i needed was to have the green light to know that the server worked, because it then allowed me to take the initiative to structure my routes, create the database, connect to mongodb and create a schema. But since i wanted to use location coordinates such as latitude and longitude, i wanted to make sure my schema was right, and so i used stock overflow to find the answers to my questions.

So, after all of my research, it turns out that i need two dsphere indexes, because apparently this supports queries that calculate geometries on an earth like sphere. Currently, we are doing pretty well 94 in terms of battery i’ve been coding for already an hour, and now i need to define my schema and finish it up to support those indexes so i’m trying to build something that is sort of scalable. If i ever decide to still work on this in the future, i’m pretty happy with the max performance right now. At this point, the device was performing really well. During my development i did feel like multitasking was flawless on top of that. The magic trackpad is still the best trackpad you can get on a laptop. The haptic feedback is just great, and i just love the fact. I barely need to press on it to press click and i obviously can’t deny the fact that the multi touch gestures come in handy when using a 13 inch, retina display with true tone and amazing color accuracy, but i just wish the bezels were smaller. Although i can’t deny the fact that the magic keyboard provides a much better typing experience, but at this point in time all i wanted to do was code or know that needed to successfully add coordinates to the database as well as retrieve them. All. Our express server was looking good, but i wanted to move away from the laptop, and so i decided to see what this machine was truly capable of with the 4k screen in use, xcode, open safari for copying code and our node server running.

I wanted to see how the device would perform if we push it to its limits, but we had a small issue. I barely remember how to make ios apps, although here’s what we wanted, an app that would have a compass app in the middle. That would point to a desired location when tapping on the screen, by the help of a maps location that we would pin. And so because i sort of knew where to find that. I was positive that i could modify the project to meet the news with five standards, call my api and make it work, but we still have an issue. I obviously don’t know how to call the api, and on top of that, i don’t want to be calling the api on places that we have real time updates and not only that but i’d like to get all my pins from the ios app. And i need to pretty much structure my json data and i completely forgot how to model those things using swift, because, sadly, just doesn’t work like javascript, but we’ll figure, those things out, and so i spent the next two hours trying to figure out how to make A request where to make that request and allow myself to add these pin locations in mongodb. I eventually figured out how to parse my json data and be able to retrieve my existing pins with my application, but because i knew at some point i would love to scale this.

I decided to modify my server in order to post user objects. I wanted these objects to contain the coordinates of the current device. We were using and update them in real time within the server, because eventually i could have an authentication system to allow users to track themselves. The mac at this point was performing like a charm being able to compile this app on. It was effortless comparing to the macbook pro 2015 model. You can see that the m1 has made some drastic improvements, and the activity monitor showed us that, with everything we were running, we still had 96 percent of cpu on idle and 6.59 gigabytes of ram being used. I do recommend getting 16 gigabytes of ram to future proof yourself, but do note that the os is capable of dynamically allocate the right amount of memory to the processes being utilized. As for thermals, we all know the air is fanless through my development on xcode. I always had a bunch of apps open except for chrome. The laptop did see a steady 45 degree celsius and it never got as hot as my 15 inch macbook pro 2017. I did install chrome on it, open a bunch of youtube videos and ran my main screen. As a second monitor, i did see a few games in celsius, but it never got to the point of burning my fingers at this point. All that was left was to deploy my app on hostinger’s, vps and so that’s.

What we did so, on tuesday april 13th, i decided to grab the macbook invade my gaming setup, open it up and head to wholestinger.com, where they make it easier for you to spin up your own vps. With a few simple clicks, i was able to set up an entire vps running ubuntu 18.0. That would allow me to deploy my node application hassle free. So i ssh into my hosting or vps updated. My packages installed the latest version of node.js and cloned my repo with the server on it into a new folder from here. I started to test my app on port 5000, but it’s. Definitely not what we wanted. I needed to enable my firewalls to block all the ports except 480 and 22 in order to set up engine x to listen to our http requests, but because i didn’t want my node process to hang the terminal i needed to install and use pm2. I proceeded to enable the firewall allow ssh and open port 80. With this done. I installed nginx and i configured the server to be able to use the reverse proxy and deliver my api and to make sure everything was working. I just typed my server’s ip address along with my endpoint, and the result was exactly what we wanted if you’re looking to deploy your own server side application, or you simply wish to deploy your own personal website. I recommend using hostinger.com don’t forget to use android’s off at checkout for an additional discount at this point.

Three hours later, the max battery life was where i expected it to be, and our application was fully completed for this development phase, even though the macbook air does only connect to one monitor, i definitely had fun developing this project on it. For those who have made it this far, let me know in the comments section down below with a hashtag people of the internet for the next weeks, i will be completing all my java and web projects for school using this device. If you have any questions, feel free to leave them down below an extended long term. Review may be uploaded. If you guys wish me to do so, don’t forget to check out hostinger.