move hkd_historical up one dir to /public

This commit is contained in:
Bitcarrot
2021-10-19 20:55:22 -07:00
parent 458efe31e9
commit a8fc91dffe
5 changed files with 5 additions and 5 deletions

View File

@@ -21,8 +21,8 @@ module.exports = {
get10yr: async function() {
// console.log("get10yr")
try {
// const content = await fs.readFile('./public/static/hkd_historical')
const content = fs.readFileSync('./public/static/hkd_historical', { encoding: 'utf8' })
// const content = await fs.readFile('./public/hkd_historical')
const content = fs.readFileSync('./public/hkd_historical', { encoding: 'utf8' })
const historical = JSON.parse(content)
hist_entries = []

View File

@@ -76,7 +76,7 @@ function hkdrate() {
})
console.log(hkdData)
const hkdHistorical = JSON.stringify(hkdData)
fs.writeFileSync("./public/static/hkd_historical", hkdHistorical)
fs.writeFileSync("./public/hkd_historical", hkdHistorical)
}

View File

@@ -165,7 +165,7 @@
</p>
</div>
<script>
d3.json('/static/hkd_historical', function(data) {
d3.json('/hkd_historical', function(data) {
data = MG.convert.date(data, 'date');
var windowWidth = $(window).width();

View File

@@ -160,7 +160,7 @@
</p>
</div>
<script>
d3.json('/static/hkd_historical', function(data) {
d3.json('/hkd_historical', function(data) {
data = MG.convert.date(data, 'date');
var windowWidth = $(window).width();