Aliyun node.js Environment

Source: Internet
Author: User
Tags require root directory aliyun

Brief introduction

Node APP engine is an application managed service based on Node.js v0.5.5, which provides online deployment of node.js applications.

Use attention

1. System node uses the v0.5.5 version, when using, please note with the 0.4.x function difference

2. If there is a log requirements please temporarily use the standard output (STDOUT/STDERR) implementation, will soon develop the log Operation API

3. Each Nodejs application in the ACE hosting environment initiates an independent process

4. Uploaded Nodejs must have index.js or Package.json files under the root directory

5. Start HTTP service can only listen on 10080 ports

6. Application process cannot start when a module with syntax errors or require is not present

Third-party modules

Only js-native modules are supported. For C module temporarily not supported

The system provides the following modules by default:

1. Express

2. Connect

3. Jade

If you need to use other modules, please put $app_home/node_modules

disabling APIs

1. child_process

2. NET.LISTENFD ()

3. Net.listen () only supports port and callback parameters, does not support monitoring Unix domain sock and the specified listening IP

code example

HTTP Service

var http = require (' http ');

Http.createserver (function (req, res) {

Res.writehead ({' Content-type ': ' Text/plain '});

Res.end (' Hello world ');

}). Listen (10080);

Console.log (' Server is running ');

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.