search

Home  >  Q&A  >  body text

node.js - 想用Node搭建本地的系统玩玩,并用Node写后台?请问该怎么去学习?是要使用框架吗?

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

黄舟黄舟2873 days ago455

reply all(3)I'll reply

  • 高洛峰

    高洛峰2017-04-17 15:17:01

    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){
        // 。。。
    })

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 15:17:01

    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

    reply
    0
  • PHPz

    PHPz2017-04-17 15:17:01

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

    reply
    0
  • Cancelreply