Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
feat: mongo integration + profile viewer increment
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Jul 31, 2022
1 parent bb6c8d9 commit 27d2d73
Show file tree
Hide file tree
Showing 10 changed files with 534 additions and 150 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/EddieHubCommunity/LinkFree) | ![Uptime](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FEddieHubCommunity%2Fmonitoring%2Fmaster%2Fapi%2Flink-free%2Fuptime.json)


## QUICKSTART

1. npm install
2. npx prisma db push




# LinkFree by EddieHub

- LinkFree connects audiences to all of your content with just one link. It is an open-source alternative to [Linktree](https://linktr.ee/) implemented in JavaScript.
Expand Down
5 changes: 5 additions & 0 deletions config/mongo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import mongoose from "mongoose";

const connectMongo = async () => mongoose.connect(process.env.MONGODB_URI);

export default connectMongo;
16 changes: 16 additions & 0 deletions models/User.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import mongoose from "mongoose";

const UserSchema = new mongoose.Schema({
username: String,
views: {
type: Number,
default: 0,
links: {
type: Map,
of: String,
default: [],
},
},
});

module.exports = mongoose.models.User || mongoose.model("User", UserSchema);
Loading

0 comments on commit 27d2d73

Please sign in to comment.