首页 新闻 搜索 专区 学院

在github下载别人的node.js项目怎么运行起来,新手求教一下流程

0
悬赏园豆:10 [已解决问题] 解决于 2017-04-10 09:09

在github下载别人的node.js项目怎么运行起来,新手求教一下流程

txworld的主页 txworld | 初学一级 | 园豆:49
提问于:2017-04-07 09:29
< >
分享
最佳答案
0

首先在自己的电脑上安装node,你下载下来的项目里应该有package.json,那里存放的是项目依赖的东西,在该项目下执行npm install 安装,当然如果涉及到数据库你还要安装数据库

收获园豆:10
zhoujian917 | 菜鸟二级 |园豆:212 | 2017-04-07 11:10

npm install 完了,然后怎么做?如果想要修改人家的代码,一般用什么IDE?

txworld | 园豆:49 (初学一级) | 2017-04-07 11:25

@txworld: IDE这个随意就好,我常用的是webstorm,想把项目运行起来package.json里面有入口文件,打开入口文件,右键,run 就起来了

zhoujian917 | 园豆:212 (菜鸟二级) | 2017-04-07 11:36

@zhoujian917: 找不到入口文件。我用的是windows系统。

{
    "name": "HiApp",
    "description": "A web app made with Framework7.With PhoneGap you can easily convert it to native iOS app.",
    "version": "3.0.0",
    "author": "BelinChung",
    "license": "MIT",
    "repository": {
        "type": "git",
        "url": "https://github.com/BelinChung/HiApp.git"
    },
    "scripts": {
        "dev": "node build/dev-server.js",
        "build": "node build/build.js",
        "lint": "eslint --ext .js,.vue src"
    },
    "keywords": [
        "ios",
        "webpack",
        "framework7",
        "vue",
        "vuejs",
        "material",
        "mobile",
        "app",
        "f7"
    ],
    "bugs": {
        "url": "https://github.com/BelinChung/HiApp/issues"
    },
    "homepage": "https://hi.dearb.me/",
    "dependencies": {
        "axios": "^0.15.3",
        "framework7": "^1.5.3",
        "framework7-vue": "^0.8.5",
        "lodash": "^4.17.4",
        "moment": "^2.17.1",
        "object-assign": "^4.1.1",
        "vue": "^2.2.2",
        "vue-i18n": "^5.0.3",
        "vuex": "^2.2.1"
    },
    "devDependencies": {
        "autoprefixer": "^6.7.2",
        "babel-core": "^6.22.1",
        "babel-eslint": "^7.1.1",
        "babel-loader": "^6.2.10",
        "babel-plugin-transform-runtime": "^6.22.0",
        "babel-preset-env": "^1.2.1",
        "babel-preset-stage-2": "^6.22.0",
        "babel-register": "^6.22.0",
        "chalk": "^1.1.3",
        "connect-history-api-fallback": "^1.3.0",
        "copy-webpack-plugin": "^4.0.1",
        "css-loader": "^0.26.1",
        "eslint": "^3.14.1",
        "eslint-config-coremail": "^0.1.1",
        "eslint-friendly-formatter": "^2.0.7",
        "eslint-loader": "^1.6.1",
        "eslint-plugin-html": "^2.0.0",
        "eslint-plugin-promise": "^3.4.0",
        "eslint-plugin-standard": "^2.0.1",
        "eventsource-polyfill": "^0.9.6",
        "express": "^4.14.1",
        "extract-text-webpack-plugin": "^2.0.0",
        "file-loader": "^0.10.0",
        "friendly-errors-webpack-plugin": "^1.1.3",
        "function-bind": "^1.1.0",
        "html-webpack-plugin": "^2.28.0",
        "http-proxy-middleware": "^0.17.3",
        "less": "^2.7.2",
        "less-loader": "^3.0.0",
        "opn": "^4.0.2",
        "optimize-css-assets-webpack-plugin": "^1.3.0",
        "ora": "^1.1.0",
        "rimraf": "^2.6.0",
        "semver": "^5.3.0",
        "url-loader": "^0.5.7",
        "vue-loader": "^11.1.4",
        "vue-style-loader": "^2.0.0",
        "vue-template-compiler": "^2.2.1",
        "webpack": "^2.2.1",
        "webpack-bundle-analyzer": "^2.2.1",
        "webpack-dev-middleware": "^1.10.0",
        "webpack-hot-middleware": "^2.16.1",
        "webpack-merge": "^2.6.1"
    },
    "engines": {
        "node": ">= 4.0.0",
        "npm": ">= 3.0.0"
    },
    "browserslist": [
        "> 1%",
        "last 2 versions",
        "not ie <= 8"
    ]
}

 

txworld | 园豆:49 (初学一级) | 2017-04-07 11:43

@txworld:那就执行scripts中定义的命令,执行是npm run dev(这个是script里命名那个名字,你这里有3个,具体执行哪个要看你自己的需求)

zhoujian917 | 园豆:212 (菜鸟二级) | 2017-04-07 12:02
其他回答(3)
0

首先你需要安装NodeJS。

爱编程的大叔 | 园豆:30698 (高人七级) | 2017-04-07 09:45

已经安装了。怎么运行项目?用什么IDE可以编辑?

支持(0) 反对(0) txworld | 园豆:49 (初学一级) | 2017-04-07 09:48

@txworld: 这,你买本书看看,或者上网搜索下教程吧。

支持(0) 反对(0) 爱编程的大叔 | 园豆:30698 (高人七级) | 2017-04-07 09:53
0

VS code 之后安装nodejs测试环境 运行调试就可以了

流年过往 | 园豆:464 (菜鸟二级) | 2017-04-07 09:50
0

先安装nodejs。

坤坤 | 园豆:919 (小虾三级) | 2017-04-07 10:47
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册