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
# API NAME DESCRIPTION SAMPLE URL | |
1 7Timer! Weather forecasts http://www.7timer.info/bin/api.pl?lon=113.17&lat=23.09&product=astro&output=json | |
2 Agify.io Predict age based on a name https://api.agify.io?name=bella | |
3 Archive.org Large public digital archive https://archive.org/advancedsearch.php?q=subject:google+sheets&output=json | |
4 Bored Activity suggestions https://www.boredapi.com/api/activity | |
5 Cat Facts List of cat facts https://cat-fact.herokuapp.com/facts | |
6 Cocktail Database Cocktail recipes https://www.thecocktaildb.com/api/json/v1/1/search.php?s=margarita | |
7 CoinBase Currency codes and names https://api.coinbase.com/v2/currencies | |
8 CoinDesk Bitcoin price index https://api.coindesk.com/v1/bpi/currentprice.json | |
9 CoinGecko Exchange rates https://api.coingecko.com/api/v3/exchange_rates |
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
import post from "../models/PostModel.js"; | |
// get all post | |
export const getPost = async (req, res) => { | |
try { | |
await post.find((error, data) => { | |
if (error) { | |
console.log(error); | |
} else { | |
// console.log(data); |
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 User = require('../models/User'); | |
const jwt = require('jsonwebtoken'); | |
const config = require('config'); | |
const bcrypt = require('bcrypt'); | |
module.exports.signup = (req,res) => { | |
const { name, email, password } = req.body; | |
if(!name || !email || !password){ | |
res.status(400).json({msg: 'Please enter all fields'}); |
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
import { makeStyles } from '@material-ui/core/styles'; | |
export default makeStyles(() => ({ | |
appBar: { | |
borderRadius: 15, | |
margin: '30px 0', | |
display: 'flex', | |
flexDirection: 'row', | |
justifyContent: 'center', | |
alignItems: 'center', |