FROM node:10 WORKDIR /usr/src/app COPY package*.json ./ RUN npm install pm2 -g RUN npm install COPY . . EXPOSE 8080 CMD [“pm2-runtime”, “server.js”]
Leave a CommentMonth: January 2020
Javascript allows us to declare fields inside the class. We can access its own fields or properties by creating an instance of a class. Example:…
Leave a CommentThe null coalescing assignment operator is a shorthand for null coalescing operations. Let’s take a example code $data[‘date’] = $data[‘date’] ?? new DateTime(); So, instead…
Leave a CommentArrow functions also called “short closures”. We can always access the parent scope, there’s no need for the use keyword. Here is a simple example…
Leave a CommentLaravel has in-built increment() and decrement() functions to increase or decrease a value of the column, by 1 or with the given number. Below are…
Leave a CommentLet us see an example of how to calculate the difference between dates using Javascript. First, write an HTML code with Javascript as below: const…
Leave a CommentThis is useful for migrations when you can’t rollback. It can easily be run in artisan mode or you can create a console command. foreach(\DB::select(‘SHOW…
Leave a CommentPHP 7.4 allows for underscores to be used to visually separate numeric values. It looks like this: $unformattedNumber = 123456789.78; $formattedNumber = 123_456_789.78; The underscores…
Leave a Comment