Making a simple blog app to learn about some technologies i haven't worked before:
- NextJS
- SQLite
- Knex
- Clone the repo with
git clone [email protected]:dostoievskiab/nextjs-simple-blog.git
- Install packages with
npm install
- Run the migrations
npx knex migrate:latest
- Run seeds
npx knex seed:all
- Run code using
npm run dev
- NextJS run around three unique functions, here are the description from the documentation (or you could access this stackoverflow post that has answer with a better explanation)
- getStaticProps - Use to fetch data at build time.
- getStaticPaths - Specify dynamic routes to pre-render pages based on data.
- getServerSideProps - Fetch data on each request.
- Should check how to automatically insert timestamp on seed files with knex/sqlite
- Need to think about user/access structure