Coder Social home page Coder Social logo

itp_nyu_student_work_web_dev_backend's Introduction

Backend dive-in: learning databases

This is my 5th assignment for the Dynamic Web Development class in ITP, NYU. The course focuses on the fundamentals of building "full stack" web applications. Assignment for this week is to write server-side JavaScript to do CRUD operations on a database, controlled by an API, and client-side JavaScript triggered by user actions and making API requests, reading/writing to the database. I also should prepare my final project proposal.

Summary

This is the base backend code for my final project, that I will describe below. I didn't work on frontend part at all, because the main goal for this week was to understand databases. I also had a few issues that I can't solve for now, most importantly โ€” connecting to the MongoDB using mongoose.connect. I know what might be the reason of the problem, and I feel like I need to start building application from scratch avoiding some of the practices I used for this one.

I am also still struggling with pushing my local repository to github, this only got worse but and I also know what might be possible solution for that.

However, I finally got what Postman does, got more comfotable with npm and the whole backend structure of the document, and even a little bit more comfortable with the syntax in general. I also start to understand what's under the hood of the data and come to thinking of it as of structured and organized objects.

Final project proposal

I am coming from Russia, and, in my opinion, there is the certain issue in my country about how some data or events are being presented in media. To be more precise, they are not presented at all or are being presented in a way that it's hard to say whether information is reliable or not.

Coronavirus is a dramatic example. My family is deeply concerned about the situation but they don't know whether the numbers of the cases in Russia are real, or authorities just manipulate the panic in order to prevent people from gathering together on any occasions including political ones.

However, I am not going to dedicate the project to the virus. I've been thinking a lot about specific ecological problem that is deeply silenced in the media. There are places in Russia that became, in fact, 'small Chernobyls' for they are being used as waste landfills or/and chemical wastes for years.

These places affect environment, water, animals, and people around them. Nevertheless, I don't think that I could just find some database with the numbers on diseases or eco-catastrophes that are caused by these huge waste dumps.

So, I started thinking how to create the dynamic data-viz' project with NO data.

One of the waste landfills in Russia, "Lesnaya ground"

I thought I could first have a brief research on the one spesific place and the damage it causes to the communities, nature, and climate, narrowing down to the limited number of implications. Then I could build a web application where people from the area could testify (= post to API) on these specific implications (case of disease, for instance). All the posts could be stored in database as json objects. Frontend part of the application is going to be the map and the images or/and words, generated out of the quotes from people's posts. More cases, the bigger these objects are (for now, I imagine something like text bubbles or word clouds). "Text bubbles" are placed on the map depending on the geolocation they came from.

Backend for final project

Below is the documentation of my process working on the database and API this week. The goal was to build the backend part of the application where users can post to the database. There were some moments of happiness when things worked, and moments of desperation. This week I wasn't focusing on the Workbook provided for us in class. Instead, I spent more time on YouTube. Maybe that was a mistake, so I made a note to myself to complete the Workbook on databases as well. It would be smart also because the workflow in the Workbook is the most up-to-date as I realized eventually.

So, it was all going rather well:

Screenshot-2020-03-07-at-21-27-39

Screenshot-2020-03-07-at-21-44-48

Screenshot-2020-03-07-at-22-19-38

Screenshot-2020-03-08-at-13-50-12

Screenshot-2020-03-08-at-13-55-16

Screenshot-2020-03-08-at-13-55-48

Screenshot-2020-03-08-at-14-11-44

And then I just couldn't connect to the datadase and post any requests using Postman.

Screenshot-2020-03-08-at-15-20-21

Screenshot-2020-03-08-at-15-02-12

I thought that I should modify these lines:

mongoose.connect(
    process.env.DB_CONNECTION,
    { useNewUrlParser: true }, () => 
    console.log('connected to DB!')

);

Here is what I ended up with after googling and studying the example code that we had in class. The problem is not solved, however, even though now my document looks closer to the class example.

Screenshot-2020-03-08-at-17-05-10

Screenshot-2020-03-08-at-17-12-56

"git: fatal: Could not read from remote repository"-situation

I will probably have to generate new SSH key because I just don't stop getting errors trying to push my local repository to the remote one from the command line.

Screenshot-2020-03-08-at-16-41-27

Screenshot-2020-03-08-at-16-35-22

And also, I didn't have any idea that the number of the uploads to GitHub is limited, so node_modules are not here. I wonder if it might be the reason why I couldn't push my repository from the terminal.

Built with

References

Resourses that I couldn't absorb this week but will have to, eventually

itp_nyu_student_work_web_dev_backend's People

Contributors

eglazkova avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.