I’ve been hooked since I first encountered Node.js and its associated Stack (MEAN) at a Yelp hackathon in 2016. The initial impression was that this web app development is fast, one minute to configure the port, set up the server, and run Hello World Node.js. My first NodeJS app was chat room + map, using socket. IO, which also refreshed my outlook and made me very impressed with Async.

My first Node project: talkover. Party

Then went to Hackathon at Shop.com, needless to say, using NodeJS. This time, they say it’s better to build a wheel. Made a nodeJS version of shop.com’s original API. I drew a gourd of my own from Node-Yelp and made Promise. It’s not just about building wheels, it’s about testing them, so I got to assert. Although not many people use it, I still feel a sense of accomplishment. After all, I have made contributions to the community.

A few months later, I will soon graduate. This time, I am working on a project for XXX security company (after the failure of trying Python Stack, I strongly suggest switching to Node Stack), and I am working on a server for a mobile app. Due to the specific requirements of the project, in addition to the design and implementation of the restful API in Node, I also made a lot of security-related things. After all, it is a graduation project, and it will really be used by XXX company. In addition, I have done some research on the file structure, configuration of NgniX and some best practices about the shite file structure of node project last time. The impression of this project is that it is very convenient to develop Web app. Find the package you want to use in NPM in one minute (usually you need to try several similar packages to see which one is more suitable), install and read the document, and then use it!

It’s convenient, it’s fast, it’s everything

Since then I haven’t read any NodeJS books, relying on online tutorials, documents and doing things like a copybook (not to mention StackOverflow). Things still do, feel read a book.

Read what? !

After graduating and getting a job, I want to start working on projects. Node was definitely chosen, regardless of application scenarios, simply to learn more about NodeJS by doing stuff. This time, I mainly made crawlers and contacted Cheerio, Request and Auth0, which refreshed the three views. This thing is good, mom no longer need to worry about login registration, user management. Since I have been working on projects related to job hunting, I found glassdoor only had one package. In order to attract more attention, I also made one, which is better than that one! Then I also made a package to obtain h1B information of the company, which was convenient for me to call in the project.

In the meantime, I got my hands on NodeJS and NodeJS Advanced Programming and started to read it. I thought I “almost” knew it, so I took a look.

Pretended to be reading

A few weeks later, I went to a hackathon at Tufts. This time, I was even more fruitful, because the hackathon lasted for 24 hours and the presentation was required afterwards. Therefore, in order to speed up the development, I put more time into the development of real functions. I found another artifact, the Hackathon-starter. With the help of this template, hackathon was completed, but it was more than that. I found that his file structure can be combined with the Best Practice THAT I searched before, so I have a set of file structure that I feel good. The rest of the project can easily begin. In addition to Hackathon-Starter, I also met members of the Go Girls Micro Light Foundation program. They went to Hackathon to find Chinese people and see if they were interested in helping them develop. I thought, well, it’s okay, and this is a pro bono event (the first time I felt like I was writing code that was socially meaningful), and I could use NodeJS anyway, so that was it. For the next four or five months (the first two months were mostly focused on development, followed by some marginal development to meet certain requirements), I went home from work and worked on this. This time the project was bigger (bigger than ever), from design to implementation, from client to administrator, from model analysis design to how to secure data, from project development to deployment of different environments (dev, QA, production). The most impressive packages are Helmet, lusca (security related), I18n (internationalization), Async (the most important one, callback layer after layer after complex function, really callhack hell). For one thing, I found that handlebar had few functions, so I learned how to customize some operations to make the engine more powerful. For the server, I contacted Forever and PM2, and I felt that PM2 was relatively better. After that, I had to deploy HTTPS for thousands of times. It was later done with the help of CertBot (it seems cloudflare can help automatically become HTTPS).

Now that I’m done with this pro bono project, I’m still making stuff, and I’m still using NodeJS. An idea comes to my mind more and more frequently: what am I learning about NodeJS, or how to use the specific package? ! All said to see the source code, understand how to work, this is really useful? In what way is it useful?

With these questions in mind, I decided to take a serious look at the course, read the book, and start with the principles. I used to learn by doing, but now I start from principles. Also use personal experience to verify the (extreme) practice school learning method and (in line with the learning method) theory school learning method, in the end will bring me what different harvest! (Updates will continue…)

The package/repo/project mentioned above:

  1. socket.io: socket.io/
  2. Node – yelp: github.com/olalonde/no…
  3. Node-shop.com: www.npmjs.com/package/nod…
  4. Cheerio: www.npmjs.com/package/che…
  5. Hackathon – starter: github.com/sahat/hacka…
  6. auth0: auth0.com/
  7. Node – glassdoor: www.npmjs.com/package/nod…
  8. Node – h1bvisa: www.npmjs.com/package/nod…
  9. Lusca: www.npmjs.com/package/lus…
  10. Helmet: www.npmjs.com/package/hel…
  11. Async: www.npmjs.com/package/asy…
  12. pm2: www.npmjs.com/package/pm2
  13. Forever: www.npmjs.com/package/for…
  14. I18n: www.npmjs.com/package/i18…
  15. certbot: certbot.eff.org/
  16. Assert: www.npmjs.com/package/ass…