Git Product home page Git Product logo

any-api's Introduction

Any Api

Contains any rest apis that I need, and maybe you need too.

View Docs · Report Bug · Request Feature

Table of Contents

About the Project

Any Api is a project that contains any rest apis that I need, and maybe you need too. This project is built using Next.js and deployed on Vercel. See the list of APIs below.

⬆️ Back to table of contents

APIs

⬆️ Back to table of contents

Technologies

  • Next.js
  • Vercel

⬆️ Back to table of contents

Installation

  1. Clone the repository

    # https
    git clone https://github.com/fauzan-radji/any-api.git
    
    # ssh
    git clone [email protected]:fauzan-radji/any-api.git
  2. Copy .env.local.example and rename to .env.local

    cp .env.local.example .env.local
  3. Fill in the environment variables in the .env.local file

    DB_SEED_KEY=your_seed_key
    JWT_SECRET=your_jwt_secret
    SALT_ROUNDS=10
    ENVIRONMENT=development

    Change your_seed_key with your own seed key. You can put literally anything here, but make sure it's a secret because it will be used to seed the database via the API. If you have better suggestions for this, please let me know. The JWT_SECRET is used to sign the JWT token. The SALT_ROUNDS is used to hash the password. The ENVIRONMENT is used to determine the environment of the app change it to production when deploying to production.

  4. If you deploy this to vercel, you need to set the JSON_MODELIZER_DATAPATH to /tmp/data since vercel doesn't allow writing to the filesystem.

    JSON_MODELIZER_DATAPATH=/tmp/data
  5. Install the dependencies

    cd any-api
    npm install
  6. Run the development server

    npm run dev
  7. Create a POST request to http://localhost:3000/seed with the following body to seed the database. Change your_seed_key with the seed key you set in the .env.local file. If you have better suggestions for this, please let me know.

    {
      "key": "your_seed_key"
    }
  8. Open http://localhost:3000 with your browser to see the result.

⬆️ Back to table of contents

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag enhancement. Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

⬆️ Back to table of contents

Acknowledgements

  • Next.js
  • Vercel

⬆️ Back to table of contents

Contact

Fauzan Radji - LinkedIn

Project Link: https://any-api.vercel.app

⬆️ Back to table of contents

any-api's People

Contributors

fauzan-radji avatar

Watchers

 avatar

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.