Last active
July 11, 2019 05:24
-
-
Save anchetaWern/82ef9f5c3aa4588fc4327b05af51f804 to your computer and use it in GitHub Desktop.
Pokedex Bot: import server modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require("express"); | |
| const bodyParser = require("body-parser"); | |
| const cors = require("cors"); | |
| const axios = require("axios"); | |
| require("dotenv").config(); | |
| const app = express(); | |
| app.use(bodyParser.urlencoded({ extended: true })); | |
| app.use(bodyParser.json()); | |
| app.use(cors()); | |
| const axios_instance = axios.create({ | |
| baseURL: 'https://pokeapi.co/api/v2', | |
| timeout: 3000, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment