Build a Node/Express API with TypeScript, MySQL on PlanetScale, and Web Scraping with Cheerio

preview_player
Показать описание
Looking for an API that doesn't exist? Go and build it yourself!

In this video, we'll create an API for characters from one of my favorite book series, Throne of Glass. We'll use Node/Express for the server and add TypeScript on top of it. Then we'll use Cheerio to web scape the Throne of Glass Wiki page and save the data into a PlanetScale database.

STAY IN TOUCH 👋

QUESTIONS...?
Рекомендации по теме
Комментарии
Автор

The fact that you are willing to step outside of your comfort zone so as not exclude anyone is amazing, there needs to be more like you.

wikcysticketb
Автор

This is all what we have been waiting for!!!! Especially with Typescript 🥳

MaxProgramming
Автор

This video is great! Just curious, could you see HasData’s API being a great tool for projects like this?

SeanSanders-np
Автор

What's that extension that auto completes your terminal commands?

object-x
Автор

love those configuration have been looking for this thanks man

davidtzirima
Автор

Please show how to deploy the node app - awesome vid btw love the channel

sneddonisaac
Автор

Sir make full stack video with postgres react express or I do suggest create Dashboard management system please 🙏🏻❤️

love_hunter_coc
Автор

Hello James, is it intended that you cant create more than one db on planetscale in your main org, but you can easily add anoter org and add a db?

Thanks for your great content😊

tmxwll
Автор

How can planetscale be used with java spring boot?

While when i run the pscale connect dbName dbBranch --execute 'npm run dev' I get an error

TypeError: Cannot read property 'substr' of null... Seems the issue is from const connection =

bald_ai_dev
Автор

Hi
I tried to use planetscale and the project without the CLI just for curiosity and interestingly the app.ts show me and error
the DATABASE_URL is undefined
Is it possible to need something extra for using the .env variables?

syrup
Автор

how come after you installed all the packages, there is no package-lock.json file created? Just the package.json.

jeffz
Автор

Hello, thank you for the tutorial. i will get to it once I'm done with current stuff.
One question though: how is it with copyright issues when scraping data from this Wiki page? Especially when it comes to images?
Is this all fine? Can we use this in our API?
Thanks

dominik-bh
Автор

Not sure if the planetScale lib helps with any of this but scrub your params. /characters/; drop table Characters; :-)

markhuggins
Автор

Need tutorial planetscale db publish to production.

FaizanAnwerAli
Автор

I'm pretty sure you put in a SQL injection exploit in there.

NibbyBanana
Автор

How come your version of ts-node works with the import syntax? I get the error:

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"

Every StackOverflow post I've seen says to remove "type": "module" from package.json but then I have to use CommonJS modules, which is kind of annoying.

EDIT - Solved. I had to add this above "compilerOptions" in my tsconfig.json:

"extends": "ts-node/node12/tsconfig.json",
"ts-node": {
"transpileOnly": true,
"files": true,
"compilerOptions": {}
},

maelstrom
Автор

Hey is Quick your real last name?
And what's that Q in the middle?

thegreatprogrammer
visit shbcf.ru