Thinkjs Framework Getting Started detailed tutorial (i) Development environment

Source: Internet
Author: User

First, the front-end standard environment

1, Nodejs correct installation, you can refer to: http://www.cnblogs.com/chengxs/p/6221393.html

2, git properly installed, you can refer to: http://www.cnblogs.com/chengxs/p/6244023.html

Second, install the THINKJS command

NPM install-g THINK-CLI

After the installation is complete, there will be a command on the system (you can view the version number of the thinkjs thinkjs -v think-cli, this version number is not THINKJS version number). If this command is not found, verify that the environment variable is correct.

Iii. Creation of the project

Execute the following statement to create the project, such as:

New

And then

CD DEMO;NPM install; NPM start;

IV. Structure of the project

The project structure created by default is as follows:

|---development.js//Portal files in the development environment|---nginx.conf//nginx configuration file|---Package.json|---Pm2.json//PM2 configuration file|---production.js//import file in production environment|---readme.md|---src| |---Bootstrap//start the Auto-execute directory| | |---master.js//automatic execution under Master process| | |---worker.js//automatic execution under Worker process| |---Config//Configuration file Directory| | |---adapter.js//Adapter configuration file| | |---config.js//Default configuration file| | |---config.production.js//default profile in production environment, and Config.js merge| | |---extend.js//Extend configuration file| | |---middleware.js//Middleware configuration file| | |---router.js//Customizing the routing configuration file| |---Controller//Controller Directory| | |---Base.js| | |---Index.js| |---logic//Logic Directory| | |---Index.js| |---model//Model Catalog| | |---Index.js|---View//Template Catalog| |---index_index.html|---www| |---Static//Static Resource Directory| | |---CSS| | |---img| | |---JS

Five, the effect

Open browser Access http://127.0.0.1:8360/ , if the project is created on the remote machine, you need to change the IP address.

The effect is as follows:

You can refer to the official documentation: https://thinkjs.org/zh-cn/doc/3.0/create_project.html

Thinkjs Framework Getting Started detailed tutorial (i) Development environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.