Learning something must be done by oneself to try to know if it is true. Always want to practice node's use, there is no good idea, after the classmate reminded, found that I can actually use node to write a blog. I have a lot of work to do with the theory ╮ (╯_╰) ╭ that has to be tried first. Then decided to record the development process.
Pre-preparation
Of course, the installation of Express and MySQL! MySQL last one said how to install, here omitted not to mention.
?
Installation of Express:
NPM install–g Express-generator
This is the latest version of the Global Install Express.
After installation, enter Express–v, the display version number means that the installation is successful!
?
New Project
CD to the desired working directory
Express–e MyBlog
Then remember to have NPM install dependencies.
After the installation, find the directory below the App.js, add the Listening port App.listen (8000);
Run a little bit inside node.
Okay, open the localhost:8000 in the browser.
This is the picture that means the success of the building.
?
Let's get here today. Plan for routing and creating databases tomorrow,
Express+mysql's Blog (1)