Build your own Node.js project
Today you'll be building your very own platform to write blog posts. You will be able to write blog posts and save them.
This is often referred to as a content management system (CMS).
This is a very basic tutorial to get you started with Node.js. At the end of the tutorial, there are optional stretch goals to introduce more advanced concepts.
We believe in learning by doing!
You will be working on this project with your team. Your mentor will be with you to help you out and answer any questions.
First, fork this repository onto your own machine
The project has been split into steps, which are documented in separate files here on the master branch.
If you run git branch
on your machine, you will see there is a branch per step. Write all your code in the relevant git branch for your step.
At the start of each step, you will need to checkout
to the next branch on Git.
You will be reminded to do this at the start of each step, like so:
git checkout [name of a particular branch]
git merge [name of previous branch]
You will see code snippets throughout the walkthrough. Try to resist the urge to copy and paste - you will learn much more if you get into the habit of typing things out.
You might want to test out small bits of code and run them before adding it to your project. For this, you can use repl.it if you like.
Throughout each step, we have bolded any jargon that you may or may not be familiar with. At the bottom, you'll find a keywords section, some of them with links to further explanations.
There's is also a link to the general Node Girls cheatsheet under Useful links at the end of this README.
Your mentor is there to help you. Don't let them die of boredom - talk to them and ask questions!
We think learning together is really important. We'd like you to do this workshop in pairs. It's a really effecive way to code that is held in high regard by many in the programming world.
One of you can fork this repository and you can take it in turns to 'drive' (i.e. type).
Don't worry, you can both get a copy of your work if the other person forks their partner's version too 😄
- Step 1 - set up your project
- Step 2 - building the server
- Step 3 - communicate with the server
- Step 4 - requests/responses
- Step 5 - serving your assets
- Step 6 - sending your blog post to your server
- Step 7 - reorganising your project
- Step 8 - get ready for the cms project
- Step 9 - build the CMS
- Step 10 - save your blog posts
- stretch - stretch goals
Have fun learning