Skip to content

Commit

Permalink
fix: place votes into data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen committed Jan 5, 2024
1 parent caa7fc1 commit b1055a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ html/movies.json
html/users.json

# storage
votes.json
votes.json
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import MOVIES from './html/movies.json' assert { type: 'json' }
import USERS from './html/users.json' assert { type: 'json' }

const defaultData = { votes: {} }
const db = await JSONFilePreset('votes.json', defaultData)
const db = await JSONFilePreset('./data/votes.json', defaultData)

const app = express()
app.use(express.json())
Expand Down

0 comments on commit b1055a4

Please sign in to comment.