Skip to content
This repository was archived by the owner on Nov 10, 2021. It is now read-only.

Commit 98a3ecb

Browse files
committed
Merge hicetnunc2000/hicetnunc-api master.
1 parent 6b83daa commit 98a3ecb

File tree

15 files changed

+780
-75
lines changed

15 files changed

+780
-75
lines changed

.eslintrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "eslint:recommended",
3+
"env": {
4+
"node": true,
5+
"es6": true
6+
},
7+
"parserOptions": {
8+
"ecmaVersion": 8
9+
}
10+
}

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.20.1

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
12.20.1

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,23 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/hicetnunc2000/hicetnunc.git"
13+
"url": "git+https://github.com/hicetnunc2000/hicetnunc-api.git"
1414
},
1515
"author": "@hicetnunc2000",
1616
"license": "MIT",
1717
"bugs": {
18-
"url": "https://github.com/hicetnunc2000/hicetnunc/issues"
18+
"url": "https://github.com/hicetnunc2000/hicetnunc-api/issues"
1919
},
20-
"homepage": "https://github.com/hicetnunc2000/hicetnunc#readme",
20+
"homepage": "https://github.com/hicetnunc2000/hicetnunc-api#readme",
2121
"dependencies": {
2222
"axios": "^0.21.1",
23-
"conseiljs": "5.0.7-2",
23+
"bignumber.js": "9.0.1",
24+
"cloud-local-storage": "0.0.11",
25+
"conseiljs": "5.0.8-1",
2426
"cors": "^2.8.5",
2527
"dotenv": "^8.2.0",
2628
"express": "^4.17.1",
29+
"fetch": "^1.1.0",
2730
"lodash": "^4.17.21",
2831
"loglevel": "1.7.1",
2932
"node-fetch": "2.6.1",

src/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use strict'
22

3+
// set node path to import from this directory as if they are node modules
34
process.env.NODE_PATH = 'src/lib'
45

56
require('module').Module._initPaths()
@@ -8,11 +9,20 @@ require('dotenv').config()
89
const cors = require('cors')
910
const express = require('express')
1011
const router = require('router')
12+
const serverless = require('serverless-http')
13+
14+
const { serverPort: PORT } = require('config')
1115

1216
const app = express()
1317

1418
app.use(express.json())
1519
app.use(cors({ origin: '*' }))
1620
app.use(router)
1721

18-
app.listen(3001)
22+
if (process.env.NODE_ENV === 'development') {
23+
app.listen(PORT, () => {
24+
console.log(`SERVER RUNNING ON localhost:${PORT}`)
25+
})
26+
}
27+
28+
module.exports.handler = serverless(app)

src/lib/config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict'
22

33
module.exports = {
4+
burnAddress:
5+
process.env.BURN_ADDRESS || 'tz1burnburnburnburnburnburnburjAYjjX',
46
feedItemsPerPage: process.env.FEED_ITEMS_PER_PAGE || 30,
57
networkConfig: {
68
network: 'mainnet',
@@ -15,4 +17,5 @@ module.exports = {
1517
nftRoyaltiesMap: 522,
1618
daoLedger: 515,
1719
},
20+
serverPort: 3001,
1821
}

0 commit comments

Comments
 (0)