Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박은주
/
Todays_Issue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박은주
2021-06-09 13:30:22 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
308892ff8aff32a341f508eb89a9d995f27801d8
308892ff
1 parent
5c8faef4
flask -> node
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
24 deletions
app.js
app.py
app.js
0 → 100644
View file @
308892f
const
http
=
require
(
'http'
);
const
express
=
require
(
'express'
)
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
const
{
rawListeners
}
=
require
(
'process'
);
var
port
=
23023
;
var
app
=
express
();
var
router
=
require
(
'./index'
)(
app
);
app
.
set
(
'port'
,
port
);
app
.
set
(
'views'
,
__dirname
+
'/static'
);
app
.
set
(
'view engine'
,
'ejs'
);
app
.
engine
(
'html'
,
require
(
'ejs'
).
renderFile
);
app
.
use
(
express
.
static
(
__dirname
+
'/static'
));
var
server
=
http
.
createServer
(
app
).
listen
(
port
,
function
(){
console
.
log
(
"Server Running . . ."
);
})
\ No newline at end of file
app.py
deleted
100644 → 0
View file @
5c8faef
import
schedule
from
flask
import
Flask
,
render_template
from
SentimentAnalyzer
import
StartSentimentAnalysis
from
content
import
GetData
app
=
Flask
(
__name__
)
@app.route
(
'/'
)
def
main
():
schedule
.
every
()
.
day
.
at
(
"08:00"
)
.
do
(
GetData
())
tot
,
positive
,
neutral
,
negative
=
StartSentimentAnalysis
()
return
render_template
(
'index.html'
,
data
=
{
'total'
:
tot
,
'positive'
:
int
(
positive
/
tot
*
100
),
'neutral'
:
int
(
neutral
/
tot
*
100
),
'negative'
:
int
(
negative
/
tot
*
100
),
})
if
__name__
==
"__main__"
:
app
.
run
(
port
=
"23023"
,
debug
=
True
)
# host 등을 직접 지정하고 싶다면
# app.run(host="127.0.0.1", port="5000", debug=True)
\ No newline at end of file
Please
register
or
login
to post a comment