Commit b4203499 authored by cicd's avatar cicd

[tag]dev

parent 03125013
Pipeline #15997 passed with stages
in 3 minutes and 58 seconds
......@@ -47,4 +47,3 @@ deploy:
- release
tags:
- chinguyen_nodejs_managestudent
#
\ No newline at end of file
### STAGE 1: RUN ###
FROM node:15.1.0
RUN chmod 1777 /tmp
RUN mkdir /data
RUN echo "Run in create image docker"
# ENV OPENSSL_CONF=/opt/openssl.cnf
FROM node:alpine
WORKDIR /usr/src/app
COPY package.json ./
RUN npm install express
......
......@@ -15,4 +15,4 @@ echo $(pwd)
cd ../..
echo $(pwd)
ls -la | sudo rm -r *
sudo rm -r *
......@@ -3,16 +3,8 @@ var app = express();
var fs = require("fs")
app.get('/', function (req, res) {
res.send('Hello World, changed');
console.log(new Date())
data = "content of file"
fs.readFile('code.html', { flag: 'wx' }, function (err, data) {
if (err) throw err;
// in ra nội dung đọc được
res.write(data);
//kết thúc response
res.end();
});
res.send('Hello World');
})
var server = app.listen(8081, function () {
......@@ -20,7 +12,7 @@ var server = app.listen(8081, function () {
var host = server.address().address
var port = server.address().port
console.log("Ung dung Node.js dang lang nghe tai dia chi: http://%s:%s", host, port)
console.log("NodeJS is listenning at: http://%s:%s", host, port)
})
//
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment