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: ...@@ -47,4 +47,3 @@ deploy:
- release - release
tags: tags:
- chinguyen_nodejs_managestudent - chinguyen_nodejs_managestudent
#
\ No newline at end of file
### STAGE 1: RUN ###
FROM node:15.1.0 FROM node:alpine
RUN chmod 1777 /tmp
RUN mkdir /data
RUN echo "Run in create image docker"
# ENV OPENSSL_CONF=/opt/openssl.cnf
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY package.json ./ COPY package.json ./
RUN npm install express RUN npm install express
......
...@@ -15,4 +15,4 @@ echo $(pwd) ...@@ -15,4 +15,4 @@ echo $(pwd)
cd ../.. cd ../..
echo $(pwd) echo $(pwd)
ls -la | sudo rm -r * sudo rm -r *
...@@ -3,16 +3,8 @@ var app = express(); ...@@ -3,16 +3,8 @@ var app = express();
var fs = require("fs") var fs = require("fs")
app.get('/', function (req, res) { app.get('/', function (req, res) {
res.send('Hello World, changed'); res.send('Hello World');
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();
});
}) })
var server = app.listen(8081, function () { var server = app.listen(8081, function () {
...@@ -20,7 +12,7 @@ var server = app.listen(8081, function () { ...@@ -20,7 +12,7 @@ var server = app.listen(8081, function () {
var host = server.address().address var host = server.address().address
var port = server.address().port 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