node.js - 想用Node搭建本地的系统玩玩,并用Node写后台?请问该怎么去学习?是要使用框架吗?
黄舟
黄舟 2017-04-17 15:15:01
0
3
453

如题,得闲说一下我把,干啃Node.js有点枯燥。。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
小葫芦

It is recommended to first use express to write a simple server to practice. Starting directly from the nodejs API is more boring and the effect is not very good.

server can include the following simple content:

  1. Routing: different access paths, returning different pages

  2. Template: Choose a front-end template according to your preference, and then return to the rendered page

  3. Local file reading and writing: For example, a request address returns a local file, so I can practice the file reading and writing API by the way

  4. req/res: Understand its properties, corresponding APIs, etc., and visually review the basics of HTTP

  5. Others: The poster is free to play

app.use('/user', function(req, res, next){
    // 。。。
})
刘奇
  1. Find a topic of interest and use nodejs to make a website or something. For example, if you like photography, you can make a website for photography and photo sharing, and imitate other websites to make one.

  2. Before doing it, make a plan first, what functions will be implemented, and what framework will be used. Once these are decided, let’s start working hard

  3. You will definitely encounter a lot of problems at the beginning. It is recommended to search on stackoverflow

  4. When doing projects using node, you must pay attention to the nodejs version and the express version. Don’t waste a lot of time because of environmental problems

PHPzhong

Go to express directly. If you know how to create node, use module

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template