<commit_before>// 在 Cloud code 里初始化 Express 框架
var express = require('express')
var app = express()
var path = require('path')

// App 全局配置
app.set('views', 'cloud/views') // 设置模板目录
app.set('view engine', 'ejs') // 设置 template 引擎
app.use(express.bodyParser())

app.get('/hello', function(req, res) {
	res.render('hello', {
		message: '002'
	})
})

app.get('/chatroom', function(req, res) {
	res.render('chatroom', {
		title: 'Chat Room'
	})
})

var server = require('http').createServer(app)
var io = require('socket.io')(server)

io.on('connection', function(socket) {
	socket.on('chat msg', function(msg) {
		io.emit('chat msg', msg)
	})
})


server.listen(8000)<commit_msg>remove port<commit_after>// 在 Cloud code 里初始化 Express 框架
var express = require('express')
var app = express()
var path = require('path')

// App 全局配置
app.set('views', 'cloud/views') // 设置模板目录
app.set('view engine', 'ejs') // 设置 template 引擎
app.use(express.bodyParser())

app.get('/hello', function(req, res) {
	res.render('hello', {
		message: '002'
	})
})

app.get('/chatroom', function(req, res) {
	res.render('chatroom', {
		title: 'Chat Room'
	})
})

var server = require('http').createServer(app)
var io = require('socket.io')(server)

io.on('connection', function(socket) {
	socket.on('chat msg', function(msg) {
		io.emit('chat msg', msg)
	})
})


server.listen()
{'fraction_non_alphanumeric': 0.2050520059435364, 'fraction_numerical': 0.007429420505200594, 'mean_word_length': 4.6125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3542800', 'n_tokens_mistral': 531, 'n_tokens_neox': 522, 'n_words': 112}