const http = require('http');const fs = require('fs');http.createServer((req, res) => { let url = req.url; console.log(url); switch (req.method){ case 'GET': if(url === '/'){ let html = fs.readFileS.
启动服务器 1:首先把glassfish安装路径中的bin文件夹配置到PATH当中 2:在命令行中运行:asadmin start-domaindomain1 其中domain1可以改变,根据你安装路径中的domains中的实例名称来定。 确认该服务正在您的系统上运行,请单击此URL:http://localhost:8080管理控制台为:https://localh
原创
2021-07-09 13:53:08
630阅读
启动 1:首先把glassfish安装路径中的bin文件夹配置到PATH当中 2:在命令行中运行:asadmin start-domaindomain1 其中domain1可以改变,根据你安装路径中的domains中的实例名称来定。 确认该服务正在您的系统上运行,请单击此URL:://localhost:8080管理控制台为:https://localh
啦啦啦
转载
2017-05-31 21:54:00
65阅读
2评论
进入项目目录输入
wget http://nodejs.org/dist/v0.10.37/node-v0.10.37.tar.gz
tar -xvf node-v0.10.37.tar.gz
cd node-v0.10.37
./configure
make
make install
转载
精选
2015-08-26 14:08:26
435阅读
Nodejs的HTTP服务器
原创
2017-01-24 14:02:51
682阅读
nodejs服务器热更新前面介绍了nodejs服务器的搭建但是没有添加热更新。于是我搜索到了nodemon插件1:全局引入npminstall-gnodemon2:作为依赖引入npminstall--save-devnodemon启动方式有两种,一种直接命令行输入nodemonapp.js另一种在package.json命令行里加入"start":"nodemonap
原创
2019-06-21 11:12:40
4639阅读
var http = require('http');
var fs = require('fs');
var url = require('url');
//创建服务器
http.createServer(function (request, response) {
//解析请求,包括文件名
var pathname = url.parse(request.url).pathna
原创
2021-04-12 09:49:18
623阅读
本文尝试使用nodejs搭建一个文件服务器。首先在官方下载node环境并安装:https://nodejs.org/en/download/安装后node被加入到系统环境变量中。>node --version>v12.14.1 1 const http = require("http"); 2 co
转载
2020-02-06 13:37:00
325阅读
2评论
NodeJS本来的用途是编写高性能Web服务器。我们首先在这里重复一下官方文档里的例子,使用NodeJS内置的http模块简单实现一个HTTP服务器。 新建server.js 以上程序创建了一个HTTP服务器并监听8888端口,node一下后,打开浏览器访问该端口http://127.0.0.1:8 Read More
转载
2015-11-04 13:45:00
116阅读
2评论
搭建本地服务器 引入第三方模块 express 利用 express 创建一个服务器 搭建静态资源服务器 引入路由总中间件 使用路由总中间件 监听服务器开启 server.js // 001 引入第三方模块 const express = require('express'); // 002 利用e ...
转载
2021-10-25 13:30:00
114阅读
2评论
1. 工具函数 module/file.js 读取文件数据 const fs = require('fs'); const readFile = (path) => new Promise((resolve) => { fs.readFile(path, (err, data) => { resol ...
转载
2021-10-21 10:07:00
104阅读
2评论
首先使用OpenSSL创建自签名证书: 使用ws模块创建wss服务器: 客户端链接:
转载
2018-08-08 20:02:00
200阅读
2评论
使用Nodejs + http 创建web服务器 1、首先创建一个server.js文件,创建服务器,以及对应css和js文件的引入和判断 var http=require(‘http’); var fs = require(‘fs’); var url = require(‘url’);//创建服务器 http.createServer(function(request,response) {
准备工作: 安装Node JS; 1:安装全局express;在express4.x版本中,安装时语句变为了这样: npm install -g express-generator 2:创建项目: 选择模板:ejs jade express name -ejs cd name npm install
原创
2021-07-30 15:33:58
315阅读
node-windowsI no longer have enough time to properly maintain this project and am seeking a new primary maintainer.This project has gained traction for two reasons:It works well on Windows.The sa...
原创
2021-05-12 12:14:39
680阅读
node-windowsI no longer have enough time to properly maintain this project and am seeking a new primary maintainer.This project has gained traction for two reasons:It works well on Windows.The same A
转载
2022-03-07 10:31:38
210阅读
关闭selinux1、通过命令“getenforce”获取selinux状态,[root@localhost ~]# getenforceEnforcing //enforceing代表开启, [root@localhost ~]# getenforcePermissive&
原创
2018-11-19 07:34:39
1220阅读
启动服务器的方法有以下几种 1 用Enterprise Manager 启动 在Enterprise Manager 的SQL Server Group 中用左键单击所要启动的服务器,或在所要启动的服务器上单击右键后,从快捷菜单中选择Start 项即可启动。 2 用SQL Server Service Manager 启动 启动方法如下: (1)从菜单中选择Service Manag...
转载
2007-07-25 10:30:00
136阅读
2评论