Integrate Nile Auth with Remix applications
GET
, POST
, PUT
, DELETE
). Additionally, you’ll see how to include client-side components for user authentication and interaction using Nile’s React SDK.
Create a new Remix project
Obtain Database Credentials
.env
file so they can be used in the application to connect to the Nile auth service.PostgreSQL
icon and also copy your database url for drizzle to use
Update create-react-router output
create-react-router
for use with Nile. We want to switch to using node-postgres
, and be able to do a top level await
for nile configuration.Add Nile to the server
Add Client-Side Code for Authentication
@niledatabase/react
to handle authentication. Replace the boilerplate of the main _index.tsx
file with the following:This component will render:Running the Project
http://localhost:3000
, and you can test your API endpoints and authentication components.