The Web Weekly Class is part a of continuous Weekly Classes presented by Google DSC Gunadarma University. This event will hold 3 workshops followed by a webinar/tech talk. You will be provided knowledge from basic javascript, node js and express js to create a microservices architecture. You will also create an 3 services that can later be consumed by the Front-end
Introduction Microservices
Building Services
Building Backend For Frontend
<aside> ➡️ REGISTRATION LINK: https://gdsc.community.dev/events/details/developer-student-clubs-universitas-gunadarma-presents-microservices-101-introduction-microservices/
</aside>
Before you start the session with your study mate, it is highly recommended to study the required knowledge prior to joining the weekly class. Watch our Pre-weekly class videos down below.
Weekly Class Prerequisites: Web Development 2021
Via DDL / Import SQL
// Database
CREATE DATABASE micro_web_gdsc;
// Structure Table
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`fullname` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
);
CREATE TABLE `products` (
`id` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`description` varchar(500) NOT NULL,
`thumbnailURL` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
);
CREATE TABLE `comments` (
`id` int(11) NOT NULL,
`userId` int(11) NOT NULL,
`productId` int(11) NOT NULL,
`comment` varchar(250) NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL
);
// Indexes
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
ALTER TABLE `products`
ADD PRIMARY KEY (`id`),
ADD KEY `userId` (`userId`);
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`),
ADD KEY `userId` (`userId`),
ADD KEY `productId` (`productId`);
// Auto Increment
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
ALTER TABLE `products`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
ALTER TABLE `comments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;
// Constraint
ALTER TABLE `products`
ADD CONSTRAINT `products_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
ALTER TABLE `comments`
ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
Collection
Microservices GDSCUG.postman_collection.json
Environment
Microservices_GDSC.postman_environment.json