Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박정인
/
opensource
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
박정인
2017-12-06 21:37:36 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7ec21dc036b73d18c1a5debd96069a47569da04e
7ec21dc0
1 parent
db6b5189
db.js
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
db.js
db.js
0 → 100644
View file @
7ec21dc
const
mysql
=
require
(
'mysql'
);
const
cnf
=
require
(
'/cnf.js'
).
AWSMYSQL
const
pool
=
mysql
.
createPool
({
connectionLimit
:
cnf
.
connectionLimit
,
host
:
cnf
.
host
,
user
:
cnf
.
user
,
password
:
cnf
.
password
,
database
:
cnf
.
database
});
exports
.
getLngLat
=
(
fail
,
done
)
=>
{
pool
.
getConnection
((
err
,
conn
)
=>
{
if
(
err
)
{
return
fail
(
err
);
}
let
sql
=
'SELECT * FROM test'
;
conn
.
query
(
sql
,
(
err
,
rows
)
=>
{
if
(
err
)
{
return
fail
(
err
);
}
conn
.
release
();
done
(
rows
);
});
});
}
Please
register
or
login
to post a comment