Building node compiling system under sublime


Building node compiling system under sublime

What’s your job?

The main function of compiling system under node is to facilitate the development and debugging of files

How to establish

Select tools compile system compile new system and enter the following:

    "cmd": ["node", "$file"],
    "selector": "source.js"

Save Ctrl + s as node.sublime-built

How do you use it?

The contents of the test file server.js are as follows:

const http = require('http');
const hostname = 'localhost';
const port = '3000';
const server = http.createServer((req, res) => {
    res.writeHead(200, {'content-type': 'text/plain'});
    res.end('hello world');

server.listen(port, hostname, () => {
    console.log(`server is running at http://${hostname}:${port}`);

Press the shortcut key Ctrl + B to execute the file compilation, and the output below indicates that the node compilation system under sublime is established successfully

server is running at http://localhost:3000

Press ESC to close the compile box

Do you want to build a node compiling system environment under sublime? Let’s try it!

Recommended Today

PHP realizes UnionPay business H5 payment

UnionPay business H5 payment interface document: document address 1: H5 payment interface address: 1: Alipay payment Test address: Official address: 2: UnionPay payment Test address: Official address: 2: Basic parameters required by the interface The interface uses get parameters. After the interface parameters are directly put into the interface address, the […]