Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
157
Issues
157
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
a1f86ad5
Commit
a1f86ad5
authored
Mar 07, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADMIN] better message when starting Gargantext in CL.
parent
82a2a9ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
API.hs
src/Gargantext/API.hs
+9
-10
No files found.
src/Gargantext/API.hs
View file @
a1f86ad5
...
...
@@ -175,25 +175,24 @@ swaggerDoc = toSwagger (Proxy :: Proxy GargAPI)
swaggerWriteJSON
::
IO
()
swaggerWriteJSON
=
BL8
.
writeFile
"swagger.json"
(
encodePretty
swaggerDoc
)
portRouteInfo
::
PortNumber
->
IO
()
portRouteInfo
port
=
do
print
(
pack
" ----Main Routes----- "
)
print
(
"http://localhost:"
<>
show
port
<>
"/index.html"
)
print
(
"http://localhost:"
<>
show
port
<>
"/swagger-ui"
)
-- | startGargantext takes as parameters port number and Ini file.
startGargantext
::
PortNumber
->
FilePath
->
IO
()
startGargantext
port
file
=
do
print
(
"Starting Gargantext server"
<>
show
port
)
print
(
"http://localhost:"
<>
show
port
)
param
<-
databaseParameters
file
conn
<-
connect
param
portRouteInfo
port
run
port
(
app
conn
)
startGargantextMock
::
PortNumber
->
IO
()
startGargantextMock
port
=
do
print
(
pack
"Starting Mock server"
)
print
(
pack
$
"curl "
<>
"-H
\"
content-type: application/json"
<>
"-d
\'
{
\"
query_query
\"
:
\"
query
\"
}
\'
"
<>
"-v http://localhost:"
<>
show
port
<>
"/count"
)
portRouteInfo
port
run
port
appMock
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment