Skip to content

Commit

Permalink
swap, dca, limit-order finished
Browse files Browse the repository at this point in the history
  • Loading branch information
NestorOlivasWork committed Sep 20, 2024
1 parent 0ae21d5 commit 6e9f2a2
Show file tree
Hide file tree
Showing 24 changed files with 4,305 additions and 464 deletions.
Empty file added config/config.js
Empty file.
17 changes: 17 additions & 0 deletions config/db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const {MongoClient} = require('mongodb');

const uri = process.env.MONGO_CONNECTION_STRING;

let client, database;

async function connectToDB(){
if(!client){
client = new MongoClient(uri);
database = client.db('solana_dex');
await client.connect();
console.log('DB connected');
}
return {client,database};
}

module.exports = {connectToDB};
Empty file.
9 changes: 9 additions & 0 deletions models/mintTokenModel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const { Schema, model } = require('mongoose');

const tokenSchema = new Schema({
address: { type: String, required: true },
name: { type: String, required: true },
symbol: { type: String, required: true }
});

module.exports = model('Token', tokenSchema);
Loading

0 comments on commit 6e9f2a2

Please sign in to comment.