How to set up a new project to host.
- Create a new Project and create a new Table
- To grab the API access code for our Next.js project, click on [Get API Snippet] on the bottom right hand corner of your UI.
- As we are working with a Next.js project and the fetch API already comes with the package — we will be using fetch as a method of retrieving our table information.
- Â Copy and save this into a javascript file inside your Next.js project.
- Disclaimer: there might be modifications needed depending on the framework you use!Â
- Navigate to `Team and Settings` in the bottom left hand corner, create your own token.Â
- Back to the code. For fetch methods, replace `xc-auth` to `xc-token` and replace the string with the token obtained from `API Tokens Management`
- Note: using `xc-auth` is not recommended for security reasons.
- Back to the Next.js project:
- Create a new javascript file and copy and paste the code obtained from NocoDB.
- Don’t forget to export the Javascript function so it can be called through pages in the project!