PasteKey is a secure and private paste service that allows you to store and share text online. It is built using Node.js, Express.js, MongoDB, and Redis.
Read The License Here
We are using the MIT license with Commons Clause Restriction, meaning you can use this project for free, but you can't sell it or use it commercially.
- Node.js (v16+)
- MongoDB
- Redis
-
Clone the repository
https://github.com/KailasMahavarkar/pastekey_api.git
-
Install dependencies
npm install
-
Create a
.env
file in the root directory and add the environment variables -
Start the server
npm start
MODE=dev
EMAIL_MODE=dev
DB_MODE=dev
MACHINE=windows
DOMAIN=https://pastekey.netlify.app
SERVER_URL_DEV=http://localhost:3000
SERVER_URL_PROD=https://pastekey.netlify.app
DB_URL_PROD=mongodb+srv://your-db-username:your-db-password@your-cluster-url/pastekey?retryWrites=true&w=majority
DB_URL_DEV=mongodb+srv://your-db-username:your-db-password@your-cluster-url/pastekey_testing?retryWrites=true&w=majority
# redis dev
REDIS_DEV_HOST=your-redis-host
REDIS_DEV_PORT=your-redis-port
REDIS_DEV_PASSWORD=your-redis-password
# redis prod
REDIS_PROD_HOST=your-redis-host
REDIS_PROD_PORT=your-redis-port
REDIS_PROD_PASSWORD=your-redis-password
# API_KEY
ENCRYPTION_KEY=your-encryption-key
PASSWORD_SALT=your-password-salt
X_API_KEY=your-x-api-key
X_TEST_KEY=your-x-test-key