Node.js MVC App with sqlite not fully operational - javascript

Trying to delve into Node.js terminology and functionality. Been consulting the following MVC example https://www.sitepoint.com/node-js-mvc-application/ that also has its GitHub repository https://github.com/sitepoint-editors/notes-board. However, when I build the app with all npm installed packages, except sqlite3 (I installed version 5), app is irresponsive in case there is a need to write to sqlite db, however it is able to read and delete any queries, but when there is a need to publish, it simply does not show any reactions. I am banging my head for a while now, so is there any advice or instruction out there what to do....

Related

How to recreate Teams and Discord installers in Electron?

I have an app in which I want to have a complete custom installer. I've looked at NSIS, Squirrel, WiX etc. But I want something fully customizable comparable with the Microsoft Teams and Discord clients.
My first idea was to separate the installer and the application so by downloading the installer and running it, a "oneclick installer" will silently install and look for updates with the autoUpdater, install the real client and remove the installed installer files, but I see a couple of problems here though: I want the user to be able to choose install directory, which I cannot figure out if that is possible through electron and the "autoUpdater" alone.
If NSIS or other can be made completely custom, please inform me because I cannot find anything about it that is of interest.

Create an electron JS desktop app with python and react js

I want to create a desktop app with Electron JS and form front end I can use React JS as I'm familiar with it.
I have a good grasp of Python I checked over the internet but they all wanted me to create an API and run it on local I can do that and connect to react electron app but for distribution, I need the user to install Python as well.
I know I can go for node js as a backend but I have a lot of work ready in Python like backend logic and the app will run on desktop only no need to connect to Internet for that.
I need to know if I need user to install python as well. I don't want that.
I think this is exactly what you're looking for, it's a reusable Electron template that uses a React front-end with Redux & Redux Toolkit, and is integrated with Python/Flask for microservices. Packaging functions with build scripts are available for Windows and macOS.
You can just copy the parts you need or clone the template and use it.
https://github.com/iPzard/electron-react-python-template
If you don't want the user to have to install Python then you need to use something to package it together. Check out Pyinstaller, once you've created an exe it can be distributed and doesn't require the user to install Python
https://www.pyinstaller.org/

Create one heroku app from two git repositories

my issue: I have server written using Spring Boot, Spring Data, MongoDB and postgreSQL. My client is written with React/Redux. I keep them in two separated git repos. Now I’d like to deploy them to Heroku. I already deployed back end but now I’m not sure how to add frontend. I’d prefer to have it as one app because then I wouldn’t have to worty about csrf.
what solutions I was thinking about: As far as I’m concerned I see two solutions:
1) deploying front end as a separated app and make calls to backend (already deployed app)
2) somehow making it into one app. I read a couple of solutions and one suggested making a Procfile, but in that question there was one git repo. Deploy two separate heroku apps from same git repo
I’m using Maven and Yarn.
If your client project is also a maven project, you can make it a dependency of your server project.
You can then make the build copy your client artifact into the src/main/resources/static folder and have your server application serve the client as static content.
Update: This link is a good guide how to do it: https://blog.jdriven.com/2016/12/angular2-spring-boot-getting-started/
It describes a multi module maven project with a spring rest backend- and an angularjs frontend module. But I am certain that the principle will work also with a react/redux frontend in a separate project.
It will require some tweaking though:)

Add NodeJS backend code to an Angular-seed based project

I recently abandoned the awesome LAMP solution for Node/AngularJS and I have some serious (and noob) difficulties to begin.
I took an existing AngularJS project based on Angular Seed and I didn't figure out how can I add some backend javascript code.
In online tutorials, I always find an app.js file, in which there is some "requires" and where I can add an extra server code. To launch this kind of project I have to node app.js
In my Angular-seed based project, there is only a package.json that contains script commands.
Also, I noticed that to launch it, I have to npm start.
Where can I put my NodeJS code in this project ?
Thanks in advance !
Usually you will have two differents projects. The backend (Nodejs) and the frontend (Angular). You can expose your backend logic using a public API that your frontend will use. For example you can expose a REST API using nodejs with help of express. I recommend you to take a look at swagger that can help you to define your api.
After that using your angular app you can send different requests to that API and consume the info that receive from it.
To sum up you will have two different projects. Hope this helps

MEAN.JS Cannot connect MongoDB

I am newbie here, starting to learn MEAN.JS, As I installed everything and tried to run
grunt --force
on the command line, it returns an error like the image below.
Im using windows here and also I already installed MongoDB on the C:/Program Files path. Thanks in advance! :)
Getting started with the MEAN stack might seem very daunting at first. You might think that there is too much new technology to learn. The truth is that you really only need to know “Javascript.” That’s right, MEAN is simply a javascript web development stack.
So, how do you actually get started developing on the MEAN stack?
The first step is to set up a project structure. I’ve found the following structure to make the most sense:
controllers/ db/ package.json server.js public/
This structure lets you keep the entire stack in a single project. Your AngularJS front end can go into the public folder while all your Express API logic goes into controller and your MongoDB collections and logic go into the db folder.
Now that you’ve set up a general project structure, you need to initialize your public folder as an Angular project. It is best to do this using a tool called Yeoman.
Yeoman is a toolkit that makes it easy for you to get started with a variety of Javascript frameworks and other web frameworks like Bootstrap and foundation. You can learn more about Yeoman at Yeoman.io.
Installing Yeoman is pretty straightforward.
You can read more here: http://www.citizentekk.com/mean-stack-tutorial-how-to-build-loosely-coupled-scalable-web-apps-nodejs-angularjs-applications/

Categories

Resources