简体   繁体   English

如何运行从github分叉的Node.JS应用程序?

[英]How to run a Node.JS app that is forked from github?

Before I say anything else, I am a complete noob to node.js and I just want to see what this web application looks like. 在我无话可说之前,我对node.js完全陌生,我只想看看此Web应用程序的外观。 I noticed this project at a hackathon and I wanted to test it out. 我在黑客马拉松中注意到了这个项目,我想对其进行测试。 They gave the github repo: https://github.com/android-fanatic/Web But I can't run it from my computer. 他们给了github仓库: https : //github.com/android-fanatic/Web但是我不能从我的计算机上运行它。 I understand that I would need to use the command prompt and run it from my local server, but can someone give me step by step directions for installing the node.js app? 我知道我需要使用命令提示符并从本地服务器运行它,但是有人可以逐步指导我安装node.js应用程序吗?

Again the link is: https://github.com/android-fanatic/Web 再次链接是: https : //github.com/android-fanatic/Web

Thanks in advance for any help! 在此先感谢您的帮助! :) :)

  1. Install Node.js 安装Node.js
  2. Clone the repository to somewhere on your hard drive 将存储库克隆到硬盘驱动器上的某个位置
  3. Open a command prompt and go to that directory 打开命令提示符并转到该目录
  4. Type npm install to install any dependencies 键入npm install以安装所有依赖项
  5. Type npm start 输入npm start
  6. ??? ???
  7. PROFIT 利润

The reason you can use npm start is because if you look inside of their package.json file you'll see a "start" option under "scripts" . 可以使用npm start的原因是,如果查看其package.json文件内部,则会在"scripts"下看到一个"start"选项。 That command will execute when you type npm start . 当您键入npm start时,该命令将执行。

Assuming you have node and npm installed on your system, you should be able to do: 假设您已在系统上安装了node和npm,则应该能够执行以下操作:

npm install
npm start

The first command will install the node package dependencies and the second will run the server. 第一个命令将安装节点程序包依赖项,第二个命令将运行服务器。

Note: I have never used this project, so my guess is based on looking at the repo alone. 注意:我从未使用过这个项目,所以我的猜测是基于仅查看仓库的。

The web application should be available at: 该Web应用程序应位于:

http://localhost:3000

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM