loading words...

Dec 11, 2018 10:15:05

Techno in Asia, day 3: Posting

by @flowen PATRON | 241 words | 🐣 | 44💌

lowen flowen

Current day streak: 0🐣
Total posts: 44💌
Total words: 16091 (64 pages 📄)

Well, well, things never work out the way you plan it (you plan life and then life happens). 

Here's my todo list from day 2:

1. create a test inserting data using strapi API

2. create scraper.js with cheerio

3. create a scraper user and authenticate in scraper.js

4. build in a webhook to netlify after succesful scrape


I sort of finished #1 & #3. Was able to authenticate with a JWT token and insert some data into Strapi. I like to use Axios for async  but for some reasons it doesn't work.. but Request does 🤔 



And then I went deep into some other things (of course, right?):

- created an index page for /clubs/ and /events/ (though home / also shows events...)

- cleaned up old boiler code

- fixed the layout

- sorta understand Staticqueries and page queries:

StaticQuery gives you the option to directly query the data in your component which is nice and follows the dogma to group by components


Am super excited about graphql and its web interface tool, graphiQL. It's so easy to create and test queries this way. Understanding how Gatsby gathers the data from its sources really helped me. No results would show up in graphQL, after adding new content-types in Strapi. Well, once you understand that during build time Gatsby gathers all data, you should know when to restart - which is every bloody time I added a new content-type. Which is a bit annoying for sure.




contact: email - twitter / Terms / Privacy