You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's get started by building up a CRO service in and around the idea of a user account.
First, get a CRO service started
Make sure it has access to a SQLite database (we'll upgrade to postgres down the road when it is called for)
Make sure the database is set up to be persistent between runnings of the service
Make sure there is an 'account' table
Make sure it has a column for numerical incrementing ID
Make sure it has a column for username
Make sure it has a column for password
BONUS: Find a way to encrypt this password so a download of the database won't compromise people's passwords (not required in early days but would be important to final product)
Make sure it has a column for email address
Make sure there's a date and time column for when the account was created
Make sure it has a get -> function to / (homepage) ...
Make sure this homepage has a with:
Username
Password
Email Address
And a submit button that'll map to a post -> /account/ endpoint in the CRO service
Make sure there is a post -> /account/ endpoint that will receive the form data
Establish a connection to the SQLite database and write the contents of the form to the database
Make sure it adds a unique ID at the same time the user is created
Make sure it adds the DATE and TIME to the table as 'created' (the form would not send this)
Package up the details about the new user (including id and created date) and send it back to the browser as JSON
Make sure there is a get -> /account// endpoint that will show the full details of a user with the username
If the username exists, send the details back as JSON
if the username does not exist, send back a 404 not found
Let's get started by building up a CRO service in and around the idea of a user account.