CentOS搭建ThinkJS开发环境

本文档详细介绍了如何在CentOS操作系统中搭建ThinkJS开发环境,包括安装Node.js,使用npm安装ThinkJS,创建验证项目,安装项目依赖,启动并访问运行中的项目。通过遵循这些步骤,开发者可以在CentOS上顺利进行ThinkJS应用的开发。
摘要由CSDN通过智能技术生成
搭建THinkJS需要Node.js来下载安装

搭建Node.js参考另一篇文章:Centos搭建Node.js

安装ThinkJS

npm安装ThinkJS
–verbose:显示详细信息
npm install thinkjs@2 -g --verbose

创建验证项目

执行如下命令
thinkjs new project_path;

安装项目依赖

cd project_path
npm install --verbose

启动项目

启动之后为阻塞方式
[root@localhost project_path]# npm start

> thinkjs-application@1.0.0 start /root/project_path
> node www/development.js

[2021-11-01 17:39:13] [Babel] Compile file common/bootstrap/global.js 185ms
[2021-11-01 17:39:13] [Babel] Compile file common/bootstrap/middleware.js 2ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/config.js 9ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/db.js 5ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/env/development.js 2ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/env/production.js 2ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/env/testing.js 2ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/error.js 3ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/hook.js 2ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/locale/en.js 4ms
[2021-11-01 17:39:13] [Babel] Compile file common/config/session.js 6ms
[2021-11-01 17:39:14] [Babel] Compile file common/config/view.js 4ms
[2021-11-01 17:39:14] [Babel] Compile file common/controller/error.js 61ms
[2021-11-01 17:39:14] [Babel] Compile file home/config/config.js 2ms
[2021-11-01 17:39:14] [Babel] Compile file home/controller/base.js 7ms
[2021-11-01 17:39:14] [Babel] Compile file home/controller/index.js 11ms
[2021-11-01 17:39:14] [Babel] Compile file home/logic/index.js 7ms
[2021-11-01 17:39:14] [Babel] Compile file home/model/index.js 10ms
[2021-11-01 17:39:14] [THINK] Server running at http://127.0.0.1:8360/
[2021-11-01 17:39:14] [THINK] ThinkJS Version: 2.3.1
[2021-11-01 17:39:14] [THINK] Cluster Status: closed
[2021-11-01 17:39:14] [THINK] WebSocket Status: closed
[2021-11-01 17:39:14] [THINK] File Auto Compile: true
[2021-11-01 17:39:14] [THINK] File Auto Reload: true
[2021-11-01 17:39:14] [THINK] App Enviroment: development

访问项目

http://192.168.10.101:8365(本机ip)

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值