Code Monkey home page Code Monkey logo

nodejs-restapi's Introduction

Node JS Rest-API

Simple Rest-API With Login System, Built using MongoDB, Express.js, and Node.js

Demo App : https://zekais-restapi.herokuapp.com/

Rest-Api : https://zekais-api.herokuapp.com/

Installation

Requirements

Cloning this repo

> git clone https://github.com/fawwaz37/nodejs-restapi.git
> cd nodejs-restapi

Use code . to open file in VS Code

> code .

Editing the file

Edit the required value in folder lib file settings.js.

module.exports = {
    port: '5000',
    limitCount: 0,
    recaptcha_key_1: '',
    recaptcha_key_2: '',
    // ex Mongodb Atlas : mongodb+srv:/xxx
    dbURI: ''
};

port: PORT localhost.

recaptcha_key_1: reCaptcha Key.

recaptcha_key_2: reCaptcha Key.

dbURI: Connection String MongoDb.

How to Get recaptcha_key

Contact Me (WhatsApp) How to get Recaptcha Key

How to Get Mongodb URI

  1. Sign In Mongodb
  2. Create a Database.

  1. Create Free Cluster.
  2. Choose Cloud Provider & Region, Create Cluster.
  3. Select Connect.
  4. Add a Connection IP Address.

  1. Create a Database User

  1. Connect Your Application
  2. Change <password> with Your Password Database User step 7

10. Copy and Paste in `settings.js`

Contact Me (WhatsApp) if You Have Problem with mongodb

Installing the dependencies

> npm install

Running App

> npm start

Then Browse http://localhost:5000 . You will see the Homepage.

Features

API EndPoint Query
Youtube MP3 /ytmp3?url= url & apikey
Youtube MP4 /ytmp4?url= url & apikey
Youtube Play /ytplay?query= query & apikey
Random Quotes /quotes apikey
Random Fakta /fakta apikey
Random Kata Bijak /bijak apikey
Random Kata Motivasi /motivasi apikey
Random Ptl /ptl apikey
Cak Lontong /caklontong apikey

If you want to unlock Premium Feature, please contact me (WhatsApp)

Premium Availability
Premium User ✔️
Expired Premium User ✔️
Added Premium Apikey ✔️
Delete Premium Apikey ✔️
Limit Apikey ✔️
Custom Limit Apikey ✔️
Custom Apikey ✔️
Reset Manual All Limit ✔️
Reset One Limit Apikey ✔️
Photooxy ✔️
Request (Total, Today) ✔️
Visitor, Total User ✔️
Pricing Section ✔️

Deploy Heroku

Go to Heroku and Login

Create New App ( App Name For Example : abcd-api)

Install Heroku CLI

Open CMD and Login Heroku

> heroku login

Initialize a git repository in a new or existing directory

> cd nodejs-restapi
> git init

Remote Your App, Use heroku git:remote -a app-name

> heroku git:remote -a abcd-api

Commit your code to the repository and deploy it to Heroku using Git.

> git add .
> git commit -am "make it better"
> git push heroku master

Log Success

nodejs-restapi's People

Contributors

fawwaz37 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nodejs-restapi's Issues

Error

/data/data/com.termux/files/home/nodejs-restapi/node_modules/express-recaptcha/dist/v2.js:23
throw new Error('site_key is required');
^

Error: site_key is required
at new RecaptchaV2 (/data/data/com.termux/files/home/nodejs-restapi/node_modules/express-recaptcha/dist/v2.js:23:19)
at Object. (/data/data/com.termux/files/home/nodejs-restapi/routes/users.js:7:19)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/data/data/com.termux/files/home/nodejs-restapi/app.js:13:21)
at Module._compile (node:internal/modules/cjs/loader:1099:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47

Node.js v17.8.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.