₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,996 members, 8,419,858 topics. Date: Thursday, 04 June 2026 at 03:25 AM

Toggle theme

Downbad's Posts

Nairaland ForumDownbad's ProfileDownbad's Posts

1 2 3 4 5 (of 5 pages)

ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 5:26pm On Jun 21, 2024
ovanda:
In essence, you no know, you no fit help. Thanks though.
You're welcome
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 7:31am On Jun 21, 2024
richebony:
Great work!!!
Thanks
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 7:31am On Jun 21, 2024
ovanda:
Bro,I had wanted to get in touch with you because, being a PERN stack developer,I had a question I would have liked to get clarity on but as you no wan respond make I ask the question here.

It's about authentication with session. You can store session in a mongoose database using the code below:

const MongoStore = require('connect-mongo')(session)

app.use(session(
secret: 'SECRET KEY',
resave: false,
saveUninitialized: true,
store: new MongoStore({
url: 'mongodb://localhost:27017/test-app', //YOUR MONGODB URL
ttl: 14 * 24 * 60 * 60,
autoRemove: 'native'
})
))

Or something similar. You don't need to create tables where it is stored as is the case with Postgresql.

To store a session in a postgresql, the code below is needed:

import genFunc from 'connect-pg-simple';

const PostgresqlStore = genFunc(session);
const sessionStore = new PostgresqlStore({
conString: '<insert-connection-string-here>',
}

app.use(session({
secret: 'secret',
resave: false,
saveUninitialized: false,
cookie: cookieOptions, // define cookieOptions
store: sessionStore
}));

I was able to successfully store a session inside a postgresql, using the code above.

In Setting Up the Database

First, I created a database called express-store-test (the name of the database doesn’t really matter).

Then I added a table called session — express will automatically look for this table for finding the session data. This table has 3 columns, which are:


sid is the session id — this is what cookies reference.
sess: contains the session as a JSON object
expire: contains the expiration timestamp for the current session

My question is this?

Assuming I am developing a crud application, would it have a new database with a different name or is there a way to build on the one I created for session?

If I have to create a new database for my crud application, how do i Link it up with the one for session?
I'm sorry about that, my Whatsapp is for people I know personally.

Do you use Discord?

Edit: I've never used PostgreSQL. I used MongoDB for this project.
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 8:21am On Jun 17, 2024
Iambro:
You're a clown
Why would you just insult someone for no reason?
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 2:35pm On Jun 16, 2024
silento:
Nice one , this is 2024 the only page that is suppose to load is the homepage , other pages should load without the browser refreshing , it can be done with any stack , nice work and hoping to see more improved and advanced demo in future
You mean Infinite scroll? I'm not a fan of it. Reddit was ruined for me when they took away actual paginations. And lots of websites still use pagination.

Thanks for the positive feedback, much appreciated.
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 8:19am On Jun 16, 2024
jesmond3945:
a machine learning model into the web application something like a recommender system or a chat bot
Alright
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 9:04pm On Jun 15, 2024
jesmond3945:
nice try embedding a machine learning problem
What do you mean?
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 7:39pm On Jun 15, 2024
Shomek:
Nice one from you bro
Thanks
ProgrammingRe: Created And Deployed My First Express Js Website. by downbad(op): 6:41pm On Jun 15, 2024
ovanda:
This is just beautiful! Bro i am learning PERN stack and I intend to develop a crud application soon. Abeg, how did you implement that next button at the very end of the website?
It's called Pagination.
WebmastersCreated And Deployed My First Express Js Website. by downbad(op): 6:34pm On Jun 15, 2024
This is a cross post from the Programming sub-forum.

I have been documenting my progress here as a web developer, as my post history would show.

Almost Two months ago (50 days ago to be exact) I deployed my second ever personal web project that i built with Django. the link to the post is here - https://www.nairaland.com/8074343/created-deployed-second-django-website

I stated that I would be trying my hands with Express js next. Well, here I am.

The link to the website is here - https://express-books-ixez.onrender.com

This project includes functionalities such as profile photo uploads, secure password changes, and account deletions with validation. It offers an admin interface for managing books, and APIs for comments, reviews, likes, favorite genres, password resets, and OTP verifications. Additional features include a search feature that uses ajax for suggestions based on existing books in the database that match what the user is typing out in the search form in real time.

Users can write, edit, and delete book reviews, with secure authentication and CSRF protection. Additionally, users can add, delete, and manage comments on books, and like or unlike reviews, all with proper validation and error handling to ensure data integrity and security.

I prefer working with Django over Express because Django provides many built-in features, whereas Express requires more in-depth customization. Currently, I'm planning to take a week off from computers to read books and watch movies, while also looking for online tech jobs if I qualify. Please excuse any initial loading delays on the website, as it is hosted on a free plan.

Thank you.

ProgrammingCreated And Deployed My First Express Js Website. by downbad(op): 5:40pm On Jun 15, 2024
I have been documenting my progress here as a web developer, as my post history would show.

Almost Two months ago (50 days ago to be exact) I deployed my second ever personal web project that i built with Django. the link to the post is here - https://www.nairaland.com/8074343/created-deployed-second-django-website

I stated that I would be trying my hands with Express js next. Well, here I am.

The link to the website is here - https://express-books-ixez.onrender.com

This project includes functionalities such as profile photo uploads, secure password changes, and account deletions with validation. It offers an admin interface for managing books, and APIs for comments, reviews, likes, favorite genres, password resets, and OTP verifications. Additional features include a search feature that uses ajax for suggestions based on existing books in the database that match what the user is typing out in the search form in real time.

Users can write, edit, and delete book reviews, with secure authentication and CSRF protection. Additionally, users can add, delete, and manage comments on books, and like or unlike reviews, all with proper validation and error handling to ensure data integrity and security.

I prefer working with Django over Express because Django provides many built-in features, whereas Express requires more in-depth customization. Currently, I'm planning to take a week off from computers to read books and watch movies, while also looking for online tech jobs if I qualify. Please excuse any initial loading delays on the website, as it is hosted on a free plan.

Thank you.

BusinessRe: Football (+/Other Sports) Betting Season 18 ➜ ➜ ➜ by downbad(m): 11:47pm On May 24, 2024
WhiteIverson:
Bet365 should be available na abi dem don comot Nigeria?
You can also try williamhill though i no know the range of their betting options
Actually, 1xbet serves me fine, I was just looking for some variety because of 1xbet's shitty bonus offers.

They give you bonus with stupid requirements like staking it in a parlay 5 times. Might as well not give out bonuses at all.

Anyway, thanks.
BusinessRe: Football (+/Other Sports) Betting Season 18 ➜ ➜ ➜ by downbad(m): 11:20pm On May 24, 2024
Good evening, house, please what foreign (international) sportsbook is available for Nigerians.

I mean a sportsbook with a variety of sports and betting options like 1xbet?

For example, Draftkings, Fanduel, and Bet365 seem to not be available for people here.

The ones I've tried are limited in what they offer.

So, basically I need something similar to 1xbet.
WebmastersA Django Website For A Client. by downbad(op): 12:45pm On May 20, 2024
This is a cross post from the programmer subforum.

This is my third Django Project and first I've built for a client - https://www.practicalcloud.net

I'm documenting my progress as a web developer on this forum.

I posted my very first Django project last year here - https://www.nairaland.com/7913868/created-deployed-first-django-website

And my second project here - https://www.nairaland.com/8074343/created-deployed-second-django-website

I am currently building a book related website similar to goodreads, but I'm using Express js, but no frontend Javascript framework. Would share it here when I'm done, hopefully before the end of next month if I don't get stuck trying to fix bugs.
ProgrammingA Django Website For A Client. by downbad(op): 12:21pm On May 20, 2024
This is my third Django Project and first I've built for a client - https://www.practicalcloud.net

I'm documenting my progress as a web developer on this forum.

I posted my very first Django project last year here - https://www.nairaland.com/7913868/created-deployed-first-django-website

And my second project here - https://www.nairaland.com/8074343/created-deployed-second-django-website

I am currently building a book related website similar to goodreads, but I'm using Express js, but no frontend Javascript framework. Would share it here when I'm done, hopefully before the end of next month if I don't get stuck trying to fix bugs.
ProgrammingRe: Created And Deployed My First Django Website. by downbad(op):
cj1080:
Wow, you guys take it to another level.

My brother you tried, for your first Django site, guessing you are more of backend person rather than frontend, thus why the design leaves more to be done.

But from what i see, the site doesn't seem to have any logic to aside from a login for users to access the content.

So my comments.

Yes the design leave more to be done, but you are on a track.

Keep at what what you want to achieve, keep fine tuning and adding features.
Once you are done, then you can go back a plug in css design features ( but make sure you id, class and name you html tags for those,).

keep up the good work dear and don't let the comments make you feel bad, just see them as a challenge to do better.

If you are open to bounce ideas on css and javascript to add to this, i am open to assist
It has features like:

Ability for logged in users to like and unlike posts and comments asynchronously (No page refresh) using FETCH API.

A logged in user is unable to access the log in page.
Ability to log in and log out.
Ability to sign in if the user does not have an account.

Ability to view articles under similar category.

Ability to like comments by logged in users asynchronously. Also ability by the user who made a comment to edit or delete it.

Ability to create (using a rich text editor), delete, and edit posts by the admin user who made the post (only admins can create posts).

The number of articles on the index page is limited to five at a time. When the number of articles exceeds 5, a pagination pops up.

Yes, the UI isn't the greatest, but it's literally my first project with a greater emphasis on the backend logic.

Anyway, thanks for the compliment.

Please, check my post history for the second website I made. It's better and more complicated than this one, showing my improvement.
WebmastersCreated And Deployed My Second Django Website. by downbad(op): 7:10pm On Apr 26, 2024
This is a cross post from the programmer subforum.

About 5 months ago I posted here on this forum that I had built and deployed my first Django web project. I also stated then that I would be embarking on another project which would be more complex. Well, here I am.

The new website is live at https://chistevstore.pythonanywhere.com/

Below are a list of some of the implemented functionalities if you do not have the time to test it all out.

1. Forgot password functionality sends a security code to the user's email for password reset.
2. Users can change their passwords and delete their accounts.
3. Detailed order views provide information about order items, delivery dates, and payment methods.
4. Users can save products for later viewing.
5. Cart items are displayed with product details, quantities, prices, and discounts.
6. Authenticated users' carts are stored in the database; Anonymous users' carts are stored in session data.
7. Users can add and remove items from the cart; Quantity updates are reflected in real-time.
8. Empty cart messages are displayed when appropriate.
9. Calculates delivery fees based on total order value.
10. Supports two payment methods: "Pay on Delivery" and "Bank Transfer".
11. Integrates with Flutterwave for payment processing.
12. Displays top-selling products based on order history.
13. Tracks user activity, including recently viewed products.
14. Facilitates product search using keywords; Displays search results with matching products and descriptions.; Provides autocomplete suggestions for efficient search input.

There are other features but it would be better for you to check out the site yourself or read up my more detailed ReadMe on the github.

If you are interested in improving the site in whatever way you can, I'll send you the link to the Github repo.

Also, of course, if you can help me secure a job, I'd be grateful and try my best not to disappoint.

Anyway, I have built two projects now with Django. A blog (check my post history for it) and an E-commerce website, and I think I want to try out other backend technologies. For my next project I am planning on building a website like Goodreads but it would be a collection of books I have personally read. I don't know what the website would look like yet. I am planning on using Express js for the backend.

I'd be sure to share the finished project here when I am done just as I did with this one. Hopefully it would be completed in less time despite it being my first project with Express.

I am a guy seeking to always improve.

ProgrammingRe: Created And Deployed My First Django Website. by downbad(op): 6:46pm On Apr 26, 2024
SparkleSix:
Good job.

But your CSS needs massive improvement...
The colours are too harsh.

Also python anywhere is thrash for hosting any serious website.

They don't offer CI/CD, you have to manually mess with the bash command line if you ship changes.

Use render.com

Good job, do more projects and find design Inspirations online before designing.
Hey I mentioned you in my latest post, don't know if you were notified
WebmastersHow To Dynamically Display The List Of States In Nigeria In My Django Website by downbad(op): 8:36am On Feb 12, 2024
I am building an Ecommerce website with Django and I want to add a feature where the user can select their delivery address from a select dropdown menu. I would like to save the User's choice to the database. The problem is that i do not want to hardcode the names of all Nigerian states, is there a way to do this dynamically? I tried using Django-Countries but it seems like the package is just for countries and not necessarily their states. I read I would need an API?

Edit: I could just create an API myself using Django Rest Framework to serve my needs, right?
ProgrammingRe: Project Based Learning (FULL-STACK DJANGO DEVELOPER) by downbad(m): 1:41pm On Jan 29, 2024
Mrviktor:
Do u have any projects?
Live?
chistev.pythonanywhere.com
CareerRe: Advice A Prospective Graduate by downbad(m): 5:40pm On Dec 28, 2023
Chesster:
Video editing
How did you land gigs? It's a pain getting a job
CareerRe: Advice A Prospective Graduate by downbad(m): 4:25pm On Dec 28, 2023
What online hustle gave you that much money? I'm interested. I've been trying and failing to get writing gigs on Upwork. I'm currently building myself as a web developer to add to my repertoire of skills.
CareerRe: Federal Workers Observe Christmas Without December Salaries by downbad(m): 6:05am On Dec 27, 2023
Sunday2021:
you are a fool. Mention your ministry let see.
Why would you just insult someone like that?
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 5:33pm On Dec 02, 2023
Wills446:
I wonder,,,oooo
Have you seen?
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 10:03am On Dec 02, 2023
Has First Bank seen alert?
RomanceRe: Last Month Of The Year, What Are Your Achievements? by downbad(m): 9:41pm On Dec 01, 2023
Started learning some programming languages and built my first web app.

One thing I wish I did better was manage my finances properly. But I'd only get better
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 4:56pm On Dec 01, 2023
Wills446:
I wonder,,,oooo
You've seen?
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 4:41pm On Dec 01, 2023
chrissoki:
Check balance e don droo
Alright
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 4:41pm On Dec 01, 2023
What's the delay with First Bank?
Jobs/VacanciesRe: Rivers State Teachers Recruitment 2012 by downbad(m): 4:02pm On Dec 01, 2023
chrissoki:
Nothing come out
So until next week?

1 2 3 4 5 (of 5 pages)