Skip to content

Commit

Permalink
database server
Browse files Browse the repository at this point in the history
  • Loading branch information
zdni committed Aug 1, 2024
1 parent a521eee commit 619f69c
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
######### SETUP SERVER
APP_PORT=4000
CORS_URL=http://localhost:3000
NODE_ENV=development # development | production

######### MONGODB SETUP
MONGODB_DB_NAME=financial-recording
MONGODB_SERVER=local # local | server
# LOCAL
MONGODB_LOCAL_URL=mongodb://localhost:27017
# ATLAS
MONGODB_ATLAS_URL=

######### JWT SETUP
JWT_ACCESS_TOKEN_SECRET=igEQntEjKt18TaNDHbyAS8WcA4tMp87r2I9VcqATy1dXZMuwsy982ezdRM8x2Pm4
JWT_ACCESS_TOKEN_LIFE=1d
JWT_REFRESH_TOKEN_SECRET=dGiC0pi47rmHVRI7eAd9pNNrMyi8MFIXbKZ257hDihPHTs3MWohBv83j0kYQvfX3
JWT_REFRESH_TOKEN_LIFE=7d
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.env
28 changes: 28 additions & 0 deletions data/financial-recording.accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[{
"_id": {
"$oid": "66a02eb520845536f648b8ee"
},
"name": "Hutang Usaha",
"account_type": "expense",
"createdAt": {
"$date": "1970-01-20T22:16:13.749Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:13.749Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66aba32c67419c1dce001596"
},
"name": "Pendapatan",
"account_type": "income",
"createdAt": {
"$date": "1970-01-20T22:28:44.460Z"
},
"updatedAt": {
"$date": "1970-01-20T22:28:44.460Z"
},
"__v": 0
}]
6 changes: 6 additions & 0 deletions data/financial-recording.counters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[{
"_id": "transactionSeq",
"seq": 2,
"prefix": 4,
"suffix": 0
}]
51 changes: 51 additions & 0 deletions data/financial-recording.users.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[{
"_id": {
"$oid": "669ee7c585d4486a3ef13468"
},
"email": "[email protected]",
"password": "$2b$10$EppI7/ltSM8gh2F.GKeZa.oCyDACXk2P1s03Z37BnOvbpKkOG1F2m",
"name": "DevOps",
"role": "superadmin",
"createdAt": {
"$date": "1970-01-20T22:14:50.053Z"
},
"updatedAt": {
"$date": "1970-01-20T22:17:46.302Z"
},
"__v": 0,
"status": "active"
},
{
"_id": {
"$oid": "66a035b110722f03645eb53e"
},
"email": "[email protected]",
"password": "$2b$10$2vzeMIB18Jow7plbQlkKPeByTn66gNqGASAGueklKgPkYDpmoWE6e",
"name": "Admin",
"role": "admin",
"createdAt": {
"$date": "1970-01-20T22:16:15.537Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:15.537Z"
},
"__v": 0,
"status": "active"
},
{
"_id": {
"$oid": "66a18c94061cbe052cc22ab5"
},
"email": "[email protected]",
"password": "$2b$10$P.ic1cxshiRdIspzHnmOnOEwogyBqSrDW0kIMg5ihZ1mLoXUVdp1q",
"name": "Testing User",
"role": "staff",
"status": "active",
"createdAt": {
"$date": "1970-01-20T22:17:43.316Z"
},
"updatedAt": {
"$date": "1970-01-20T22:28:44.448Z"
},
"__v": 0
}]
91 changes: 91 additions & 0 deletions data/financial-recording.vendors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[{
"_id": {
"$oid": "66a0311720845536f648b8f5"
},
"name": "Vendor A",
"createdAt": {
"$date": "1970-01-20T22:16:14.359Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.359Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0311920845536f648b8f7"
},
"name": "Vendor B",
"createdAt": {
"$date": "1970-01-20T22:16:14.361Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.361Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0311c20845536f648b8f9"
},
"name": "Vendor C",
"createdAt": {
"$date": "1970-01-20T22:16:14.364Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.364Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0311d20845536f648b8fb"
},
"name": "Vendor D",
"createdAt": {
"$date": "1970-01-20T22:16:14.365Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.365Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0311f20845536f648b8fd"
},
"name": "Vendor E",
"createdAt": {
"$date": "1970-01-20T22:16:14.367Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.367Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0312020845536f648b8ff"
},
"name": "Vendor F",
"createdAt": {
"$date": "1970-01-20T22:16:14.368Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.368Z"
},
"__v": 0
},
{
"_id": {
"$oid": "66a0312220845536f648b901"
},
"name": "Vendor G",
"createdAt": {
"$date": "1970-01-20T22:16:14.370Z"
},
"updatedAt": {
"$date": "1970-01-20T22:16:14.370Z"
},
"__v": 0
}]

0 comments on commit 619f69c

Please sign in to comment.